| Summary: | GMF : Shorcut disappears from diagram | ||
|---|---|---|---|
| Product: | [Modeling] GMF-Tooling | Reporter: | Laurent Le Moux <laurent.lemoux> |
| Component: | Generation / Templates | Assignee: | Project Inbox <gmp.gmf-tooling-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | minor | ||
| Priority: | P3 | CC: | borlander |
| Version: | unspecified | ||
| Target Milestone: | 3.0M4 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
Could you please post the generated canonical EditPolicy here? Hi, All necessary files can be downloaded from the corresponding forum entry : http://www.eclipse.org/forums/index.php/t/244954/ Regards, Laurent Duplicate to Bugzilla #327389 which is now fixed. *** This bug has been marked as a duplicate of bug 327389 *** |
Build Identifier: Version: 3.7.1 Build id: M20110909-1335 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. I then save the files but, when I refresh the second diagram (F5), shortcut and link disappear ! In XXCanonicalEditPolicy.refreshSemantic(), it appears that the shortcut is added to an 'orphaned' list and removed. Here's a workaround to filter out the shortcut from the 'orphaned' list : for (Iterator<View> shortcutsIterator = knownViewChildren.iterator(); shortcutsIterator.hasNext() { View next = shortcutsIterator.next(); if (next.getEAnnotation("Shortcut") != null) { shortcutsIterator.remove(); } } I added these few lines just before 'orphaned.addAll(knownViewChildren);'. However, I believe something should be done at GMF code generation level to prevent from behaviour. Kind regards, Laurent Reproducible: Always Steps to Reproduce: See description.