| Shorcut disappears from diagram [message #734416] |
Fri, 07 October 2011 12:56  |
Eclipse User |
|
|
|
Hello,
I have got a problem experimenting the Jevon Drag & Drop tutorial.
I defined the simple following model (see attached file) :
ModelA (container) -has-> 1..* ElementA
ElementA has a 'name' attribute and -references-> 0..1 ElementA (itself).
I generated the corresponding GMF plugin after setting the following parameters in the ModelA.gmfgen file as requested in the Jevon 'Drag and Drop' tutorial :
Contains Shortcuts To : modela (ecore file extension)
Shorcuts Provided For : modela.diagram.part.ModelADiagramEditorID
Then I created two diagrams, the first one containing a single 'My A' element.
In the second one, I created a 'My B' element.
Then I drag and drop the 'My A' element from the navigator on the second diagram.
It works fine. I also can link both the element and the created shortcut.
But, when I save all this, the second ecore file contains only "My B". No reference to the shortcut !
And, when I refresh the second diagram (F5), shortcut and link disappear !
After debugging, it appears that GMF removes the shortcut and the link from the diagram because the shortcut is indeed not persisted in the corresponding ecore file.
I don't understand this behaviour and I found no way to modify it neither in the ModelA.ecore file, nor in the ModelA.genmodel.
Modifying 'Containment proxies' and 'Resolve Proxies' properties changed nothing.
Any help would be highly appreciated !
Laurent
Attachment: ModelA.ecore
(Size: 0.84KB, Downloaded 319 times)
|
|
|
| Re: Shorcut disappears from diagram [message #735441 is a reply to message #734416] |
Tue, 11 October 2011 15:52   |
Eclipse User |
|
|
|
Hello,
I tried to reproduce it and the described use case works fine for me.
Note that shortcuts are the notions from the diagram resource, they are not expected to be persisted in the semantic model. Please check that the diagram file contains the node for shortcutted element after D&D.
I would suggest you to debug with breakpoints in the XXXDiagramCanonicalEditPolicy#isOrphaned(...)
and, if it does not help, then in the ViewImpl#removeChild(View) - you may post the stack trace at the latter one here.
You may also post your diagram plugin here for me to take a look.
Regards,
Svyatoslav Kovalsky
at Montages Think Tank, Prague, Czech Republic
Montages AG, Zurich, Switzerland
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07060 seconds