Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 369562

Summary: [QVTO-Bridge] Use gmf trace model to generate correct visual ids
Product: [Modeling] GMF-Tooling Reporter: Guillaume Hillairet <g.hillairet>
Component: CoreAssignee: Guillaume Hillairet <g.hillairet>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: borlander, javidcf
Version: 3.0Flags: borlander: juno+
Target Milestone: 3.0M5   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard: Extensibility
Attachments:
Description Flags
Patch that adds support of trace model for generation of visualIDs in qvto-bridge
none
Tests for related patch none

Description Guillaume Hillairet CLA 2012-01-24 12:53:51 EST
The java bridge currently uses VisualIdentifierDispenser to generates visualID according to 
information store in a trace model. This insure to keep same visualID in gmfgen model even if 
changes have been made to gmfmap model. The qvto bridge currently does not use the trace model, and 
so visualID are generated solely according to their position in the object tree.

For example, if a Map model containing 2 nodes is used to generate a GMFGen model, at the first iteration, the visualID 
will be generated according to the position of the nodes, and a trace model is generated.
Map    ->    Gen           -> Trace
 |_n1           |_2001            |_n1->2001
 |_n2           |_2002            |_n2->2002
 
If changes are made ot the Map model, e.g. add a node at the top, thus modifying position of previous nodes. 
The only way to keep mapping of visualID is to use the trace model. This is done by  the VisualIdentifierDispenser 
implementation in java bridge.
 
 Map         ->   Gen            -> Trace
  |_n0              |_2003              |_n1->2001
  |_n1              |_2001              |_n2->2002
  |_n2              |_2002              |_n0->2003
  
QVTO bridge should have access to VisualIdentifierDispenser via a black box, allowing usage of already existing code 
to generate visualID without having to deal directly with the trace model in the qvto transformation.
Comment 1 Michael Golubev CLA 2012-01-24 12:57:03 EST
This is important one, please make sure we have JUnit's for this.
Comment 2 Guillaume Hillairet CLA 2012-01-26 06:16:31 EST
Created attachment 210106 [details]
Patch that adds support of trace model for generation of visualIDs in qvto-bridge
Comment 3 Guillaume Hillairet CLA 2012-01-26 06:16:58 EST
Created attachment 210107 [details]
Tests for related patch
Comment 4 Javier de la Dehesa CLA 2012-04-04 05:56:04 EDT
*** Bug 376022 has been marked as a duplicate of this bug. ***
Comment 5 Michael Golubev CLA 2012-05-30 01:15:01 EDT
Verified with M7