|
Re: Defining common figures and edit parts [message #676167 is a reply to message #675815] |
Fri, 03 June 2011 05:12 |
Robert Wloch Messages: 109 Registered: July 2009 |
Senior Member |
|
|
Hi Alex,
you might want to import gmf.codegen plugin as source project into your workspace and have a look at the contents of the "templates" folder. Copy the templates you need for your changes (and keep the folder structure) to the plugin with your gmf models. Then in gmfgen, set "use dynamic templates" to true and set the path of the "template directory". This enables you to modify the generated code. However, GMF's xPand does not create all files itself. Most of that is done in GMF's Generator class (the interesting methods are private and thus not visible or overridable). If you need to customize that class you might:
- want to check the ObjectTeams project or
- figure out a way to replace the usage of that class by GMF's generate diagram code wizzard or
- check out GMFTools from source, modify its call to the GMF Generator class and install it into your IDE afterwards. GMFTools gives you more options to set (and keep!) defaults to gmfgen file when that one is generated. Plus: it gives you a single button to generate gmfgen and diagram code at once.
Hope this helps.
Rob
[Updated on: Fri, 03 June 2011 05:16] Report message to a moderator
|
|
|
|
Re: Defining common figures and edit parts [message #676389 is a reply to message #676323] |
Sat, 04 June 2011 04:49 |
Robert Wloch Messages: 109 Registered: July 2009 |
Senior Member |
|
|
Alex,
comments below...
Alex wrote on Fri, 03 June 2011 12:54Thanks Robert,
I was looking at GMFTools, but the last commit was back in October 2010 so I was not sure if project is still active.
It's still active. So far it serves our purpose, hence few commits lately.
Quote:So if I understand it correctly GMF does not provide a way to define common classes (figures/edit parts) in its editors, so this is where GMFTools come in?
GMF does not provide an easy way via modeling. You need to tweek the templates and/or Generator class, but you do not need GMFTools for that. The changes can be done without it.
Quote:
Also, what are your thoughts on Graphiti project and EuGENia?
I haven't used EuGENia yet, but had a look at Graphiti about a year ago. It appeared to be a replacement for GEF. So you don't get the EMF model synch stuff GMF provides but need to code it yourself. This left me concluding that there's going to be some "modeling project" coding a modeling environment ontop of Graphiti taking the role GMF took for GEF. Turns out I was right: The Spray project was started recently.
Quote:
Thanks,
Alex
Rob
|
|
|
Powered by
FUDForum. Page generated in 0.03361 seconds