Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 321567 - Corrupted Visual IDs after re-creating gmfgen
Summary: Corrupted Visual IDs after re-creating gmfgen
Status: NEW
Alias: None
Product: GMF-Tooling
Classification: Modeling
Component: Core (show other bugs)
Version: 2.3.0   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 321572
  Show dependency tree
 
Reported: 2010-08-03 05:55 EDT by Christian Waniek CLA
Modified: 2011-08-08 12:30 EDT (History)
2 users (show)

See Also:


Attachments
original gmfmap (60.50 KB, application/octet-stream)
2010-08-03 05:56 EDT, Christian Waniek CLA
no flags Details
original gmfgen (276.89 KB, application/octet-stream)
2010-08-03 05:56 EDT, Christian Waniek CLA
no flags Details
original trace (24.94 KB, application/octet-stream)
2010-08-03 05:57 EDT, Christian Waniek CLA
no flags Details
gmfmap with my changes (61.43 KB, application/octet-stream)
2010-08-03 05:57 EDT, Christian Waniek CLA
no flags Details
changed gmfgen (283.49 KB, application/octet-stream)
2010-08-03 05:58 EDT, Christian Waniek CLA
no flags Details
trace after recreating gmfgen (25.55 KB, application/octet-stream)
2010-08-03 05:59 EDT, Christian Waniek CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Waniek CLA 2010-08-03 05:55:41 EDT
Build Identifier: 

Briefly:
I made changes to a gmfmap-file. I recreated the gmfgen.
=> The VISUAL_IDs of two edit parts (one of them was added due to my changes), mapping to the same metamodel class but to different features, are broken.

I've been extending the UML2Tools. So as metamodel I use the UML2 metamodel from the Eclipse UML2 project. I've been adding a new mapping to the component diagrams gmfmap file (uml::Class instances in feature uml::Component::nestedClassifier should also be visible inside a Component figures content compartment).
But when I re-create the gmfgen file there are two uml::Class mappings (EditParts), becoming mixed up. Originally there is a 'ClassDiagramNotationInnerClassEditPart' with visual id 3013. After re-creating the gmfgen there is a Class6EditPart with visual id 3021, which has the same semantic meaning as ClassDiagramNotationInnerClassEditPart. The newly added Class5EditPart has now the visual id 3013.

This is very annoying because besides there is custom code which relies on the visual ids (this could be changed) I wouldn't be able to open every old component diagram file. In my opinion the trace mechanism should prevent already existing mappings from getting mixed up with newly added mappings. But in this case it doesn't seem to work well.

Because I'm not so deep into GMF I couldn't figure out what's the reason for this behavior or why the trace doesn't work well.

Reproducible: Always
Comment 1 Christian Waniek CLA 2010-08-03 05:56:25 EDT
Created attachment 175750 [details]
original gmfmap
Comment 2 Christian Waniek CLA 2010-08-03 05:56:41 EDT
Created attachment 175751 [details]
original gmfgen
Comment 3 Christian Waniek CLA 2010-08-03 05:57:01 EDT
Created attachment 175752 [details]
original trace
Comment 4 Christian Waniek CLA 2010-08-03 05:57:47 EDT
Created attachment 175753 [details]
gmfmap with my changes
Comment 5 Christian Waniek CLA 2010-08-03 05:58:31 EDT
Created attachment 175754 [details]
changed gmfgen

the gmfgen after having recreated it with my changed gmfmap
Comment 6 Christian Waniek CLA 2010-08-03 05:59:02 EDT
Created attachment 175755 [details]
trace after recreating gmfgen

trace after recreating gmfgen with the changed gmfmap
Comment 7 Mickael Istria CLA 2011-08-08 12:30:35 EDT
Do you use the Experimental SDK with its org.eclipse.gmf.bridge.trace plugin? It should create a .trace file beside of your model when generating code and should preserve VisualIDs.