|Diagram AND model partitioning with GMF [message #725712]
||Thu, 15 September 2011 15:11
| Laurent Le Moux
Registered: September 2011
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,
Powered by FUDForum
. Page generated in 0.08215 seconds