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 11:11 Go to next message
Laurent Le Moux is currently offline Laurent Le Moux
Messages: 147
Registered: September 2011
Senior Member
Hello,

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 : www.jevon.org/wiki/GMF_Diagram_Partitioning

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,

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

I hope, it can be useful.

hflorezf-en.blogspot.com/2014/04/gmf-partitioning.html


Regards,
Hector F
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: Fri Aug 29 08:30:10 EDT 2014

Powered by FUDForum. Page generated in 0.03926 seconds