Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Diagram AND model partitioning with GMF(Both diagram AND model partitioning with GMF)
Diagram AND model partitioning with GMF [message #725712] Thu, 15 September 2011 15:11 Go to next message
Laurent Le Moux is currently offline Laurent Le MouxFriend
Messages: 184
Registered: September 2011
Senior Member

I hope somebody can help me with diagram AND model partitioning with GMF.
I defined a first model to describe a service (SRV model).
Then I defined a second one (APP model) to describe components used by an application.
Among these components an application may use a service defined in the first place.

Therefore, I would like to represent a service used by an application in the application diagram.
And then, I would like to open the diagram describing this service by double-clicking on its representation in the application diagram.

At first glance, it looks like the GMF diagram partitioning tutorial available on the Jevon web site :

However, there's a small difference.
The online tutorial deals with diagram partitioning based on a SINGLE underlying model or ecore file.
Whereas, in my case, the APP model refers to an 'outside' service element defined in another model (the SRV one).

To link both models and make the service element available in my APP model, I simply loaded the SRV model as a resource in the APP model.
Then I used the EMF Generator Model to generate the APPModel.genmodel and I selected BOTH packages (APP et SRV).
No problem with generating model, edit and editor code.
No problem either to run my example : I created a service description diagram and then an application diagram with a reference to the service previously defined and loaded as a resource.

The problem occurs when I try to generate the corresponding GMF editor.
Either the GMF Graph, Tool or Map lets me select only the APP Model which doesn't contain the service element.
But they don't let me select BOTH packages (that is, also the SRV 'dependency') like the EMF Generator Model does.

As a consequence, neither the APP Graph, Tool nor Map file will reference the service element and it won't even appear in the APP diagram of the resulting GMF editor.

I guess, I could manually add the corresponding entries in the APP Graph and Tool files but what about the mapping file ? Should I use a 'Child reference' ?
Is there any other solution ?
Of course, it would be better if I could somehow 'force' the loading of the SRV dependency so that I could avoid "hand writing" that usually leads to errors and is time-consuming as the number of dependencies increases...

Thanks for the answers,

Re: Diagram AND model partitioning with GMF [message #1318578 is a reply to message #725712] Sun, 27 April 2014 19:16 Go to previous message
Hector Florez is currently offline Hector FlorezFriend
Messages: 6
Registered: February 2013
Location: Colombia
Junior Member
I solved GMF Partitioning with the following case study.

I hope, it can be useful.
Previous Topic:org.eclipse.gmf.runtime.lite.svg.SVGFigure
Next Topic:Not to dirty the editor when figure is collapsed/expanded
Goto Forum:

Current Time: Tue Mar 28 17:52:22 GMT 2017

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

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