Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Create gmfgen from gmfmap and generate code
Create gmfgen from gmfmap and generate code [message #217404] Thu, 05 February 2009 16:37 Go to next message
Achilleas is currently offline AchilleasFriend
Messages: 88
Registered: July 2009
Member
Hi,

I have just used the EcoreGeneratorTask via an ant script to generate from
an .ecore model the .genmodel and generate the corresponding code.

Is there a similar way using an ant task to create from a .gmfmap model
the .gmfgen and generate the diagram code for that. In case there is no
ant task to do that, could someone provide a starting point on how to do
that?

Should I start from the Generation Framework Package
org.eclipse.gmf.codegen.gmfgen? I am kind of lost on that.

Thanks,

Achilleas
Re: Create gmfgen from gmfmap and generate code [message #217420 is a reply to message #217404] Thu, 05 February 2009 19:12 Go to previous messageGo to next message
Achilleas is currently offline AchilleasFriend
Messages: 88
Registered: July 2009
Member
Hi again,

Any pointers towards this issue?

Thanks,

Achilleas
Re: Create gmfgen from gmfmap and generate code [message #217435 is a reply to message #217420] Fri, 06 February 2009 09:56 Go to previous messageGo to next message
Achilleas is currently offline AchilleasFriend
Messages: 88
Registered: July 2009
Member
Hi,

Sorry for posting again but I don't seem to know how to start with this! I
have a .gmfmap model and I will like to create the .gmfgen and generate
the diagram code from that.

I found out that xpand has replaced JET templates (thats very good I might
add) for the generation of diagram code. I also extracted the templates
included in the org.eclipse.gmf.codegen but I don't know how to use them.

I will keep searching for an answer and hope someone might reply.

Thanks,

Achilleas
Re: Create gmfgen from gmfmap and generate code [message #217459 is a reply to message #217435] Fri, 06 February 2009 12:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cayla_sha.gmx.net

Hello Achilleas,

I don`t really understand what you want to do. I don`t know what JET
Templates and ant scripts have to do with the generation of gmfmap and
gmfgen-files.
Did you follow any of the Tutorials yet:
http://wiki.eclipse.org/index.php/GMF_Documentation ?

Perhaps you can describe your problem more precisely?

Best wishes
Julia
Re: Create gmfgen from gmfmap and generate code [message #217466 is a reply to message #217404] Fri, 06 February 2009 12:58 Go to previous messageGo to next message
urs zeidler is currently offline urs zeidlerFriend
Messages: 91
Registered: July 2009
Member
Achilleas schrieb:
> Hi,
>
> I have just used the EcoreGeneratorTask via an ant script to generate
> from an .ecore model the .genmodel and generate the corresponding code.
>
> Is there a similar way using an ant task to create from a .gmfmap model
> the .gmfgen and generate the diagram code for that. In case there is no
> ant task to do that, could someone provide a starting point on how to do
> that?
>
> Should I start from the Generation Framework Package
> org.eclipse.gmf.codegen.gmfgen? I am kind of lost on that.
>
> Thanks,
>
> Achilleas
you could use an other approach as ant :
http://opensource.urszeidler.de/ATLflow/html1/samples/genera teGMF.html

greetings, urs.
Re: Create gmfgen from gmfmap and generate code [message #217474 is a reply to message #217459] Fri, 06 February 2009 13:01 Go to previous messageGo to next message
Achilleas is currently offline AchilleasFriend
Messages: 88
Registered: July 2009
Member
Hi Julia,

Ok to be more precise.

I have an .ecore model from which I am able to automatically
(programmatically) create the .genmodel and generate the java code for the
model,edit,editor projects. This is performed by running an ant script
that makes use of the EcoreGeneratorTask to generate the .genmodel and the
java code. Not by using the Eclipse EMF capabilities, e.g. right click on
genmodel and choose "Generate Model Code". Using this automatic task I
can generate the code and run an instance of the EMF tree-based editor to
define my models.

Now I want to do the same for the diagram GMF-based editor. I have the
gmfmap model and I don't want to right-click on it and choose "Create
generator model" and the right click on .gmfgen to choose "Generate
diagram code"; via the eclipse GMF capabilities. What I want is to
automate this task programmatically or via an ant script as in the first
case.

And yes I have read most of the tutorials. I hope my clarification is
precise so that anyone can provide me with some guidelines how to start
doing that?

Thanks,

Achilleas
Re: Create gmfgen from gmfmap and generate code [message #217617 is a reply to message #217474] Fri, 06 February 2009 17:34 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Achilleas,

Unfortunately there is no such ANT-task in GMF now.
You can create it yourself and then contribute it to GMF. While writing this
task you have to instantiate and execute org.eclipse.gmf.internal.bridge.transform.TransformToGenMode lOperation
class using existing Map->Gen transformation wizard implementation as an
example (org.eclipse.gmf.internal.bridge.transform.TransformToGenMod elWizard).

-----------------
Alex Shatalin
Re: Create gmfgen from gmfmap and generate code [message #217733 is a reply to message #217617] Sun, 08 February 2009 11:51 Go to previous messageGo to next message
Achilleas is currently offline AchilleasFriend
Messages: 88
Registered: July 2009
Member
Hello Alex,

Thanks for the suggestions and for clarifying that there is no ant task
for GMF. I will try to do that following the class and wizard you
suggested as a starting point. I will let you know of the outcome.

Thanks,

Achilleas
Re: Create gmfgen from gmfmap and generate code [message #526375 is a reply to message #217617] Fri, 09 April 2010 22:29 Go to previous messageGo to next message
Jevon  is currently offline Jevon Friend
Messages: 164
Registered: July 2009
Senior Member
Hi everyone,

Has there been any progress in implementing an Ant task for gmfmap->gmfgen?

I had a go at trying to automate it within Eclipse myself a few weeks
ago, but most of the necessary classes were hidden in .internal.*
packages. I am pretty sure it's not possible to provide this
functionality without having to delve and commit directly into the trunk.

Jevon

Alex Shatalin wrote:
> Hello Achilleas,
>
> Unfortunately there is no such ANT-task in GMF now. You can create it
> yourself and then contribute it to GMF. While writing this task you have
> to instantiate and execute
> org.eclipse.gmf.internal.bridge.transform.TransformToGenMode lOperation
> class using existing Map->Gen transformation wizard implementation as an
> example
> (org.eclipse.gmf.internal.bridge.transform.TransformToGenMod elWizard).
>
> -----------------
> Alex Shatalin
>
>
Re: Create gmfgen from gmfmap and generate code [message #526451 is a reply to message #526375] Sun, 11 April 2010 09:12 Go to previous message
Robert Wloch is currently offline Robert WlochFriend
Messages: 109
Registered: July 2009
Senior Member
Hi Jevon,

you could try GMFTools. Basically, it provides what you're looking for: automated transformation of gmfmap to gmfgen and even the diagram code. Additionally, using Xtend you can merge special settings (the GMF reconciler usually "forgets") into the target gmfgen. Even batch generation is possible, if you're developing several GMF editors. On the GMFTools site there's a wiki to help you get started.

Rob
Previous Topic:Re: Live validation
Next Topic:"A handler conflict occurred.  This may disable some commands."
Goto Forum:
  


Current Time: Tue Apr 23 12:59:41 GMT 2024

Powered by FUDForum. Page generated in 0.03593 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top