Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Extending an editor
Extending an editor [message #1722351] Thu, 04 February 2016 09:17 Go to next message
Davide Profeta is currently offline Davide ProfetaFriend
Messages: 4
Registered: February 2016
Junior Member
Good regards,

i'm a beginner GMF developer. I would like to know how to create a graphic editor extending another already created. In particular, i would like to extend ecore model by adding new entities and relationships, and so to represent new nodes and links in the new editor.
Re: Extending an editor [message #1722624 is a reply to message #1722351] Sun, 07 February 2016 08:55 Go to previous messageGo to next message
Ángel Moreno is currently offline Ángel MorenoFriend
Messages: 13
Registered: November 2013
Location: Madrid
Junior Member
Hi Davide,

You must redefine all the models implied in the generation of the GMF diagram that u have. This implies modify, in first place the ecore metamodel... adding to this, the elements that give support to the new nodes (EClass) or links (Eclass or EReferences) that you want to add... In second place, you must modify the gmfgraph model to add the graphic information for the elements created in the ecore (adding Figure Descriptors with the graphic info and creating Nodes, Connections, Diagram Labels and Compartments) and later add new tools (Creation tools) to the gmftool...

With this modifications in ecore, gmfgraph and gmftool... you must stablish the relationships (Top References, Child References or Link Mappings) between the ecore elements, the graphic elements and the tools in the gmfmap, stablishing what its a node or link, and stablishing the graphic form of the gmfgraph and the tool of the gmftool for the gmfmap.

To finish you must regenerage the gmfgen, reload the genmodel, regenerate the model and edit code from the genmodel, and regenerate the diagram code from the GMF Dashboard...Probably you must modify the underlined Java Code, because between regenerations you lost custom Java Code....

Greatings,

Angel M.


Ángel M.
Researcher @ Kybele Research Group
Rey Juan Carlos University, Madrid, Spain

[Updated on: Sun, 07 February 2016 12:37]

Report message to a moderator

Re: Extending an editor [message #1723049 is a reply to message #1722624] Thu, 11 February 2016 09:21 Go to previous message
Davide Profeta is currently offline Davide ProfetaFriend
Messages: 4
Registered: February 2016
Junior Member
Hi Ángel,
much appreciated for your supporting.
Previous Topic:How to display the referenced element of a connection as a label in GMF
Next Topic:How to remove corners of the EditPartFigure (which appears when selected)
Goto Forum:
  


Current Time: Sat Dec 16 01:39:49 GMT 2017

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

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