Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 369562 - [QVTO-Bridge] Use gmf trace model to generate correct visual ids
Summary: [QVTO-Bridge] Use gmf trace model to generate correct visual ids
Status: RESOLVED FIXED
Alias: None
Product: GMF-Tooling
Classification: Modeling
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: Macintosh Mac OS X
: P3 enhancement with 1 vote (vote)
Target Milestone: 3.0M5   Edit
Assignee: Guillaume Hillairet CLA
QA Contact:
URL:
Whiteboard: Extensibility
Keywords:
: 376022 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-01-24 12:53 EST by Guillaume Hillairet CLA
Modified: 2012-05-30 01:18 EDT (History)
2 users (show)

See Also:
borlander: juno+


Attachments
Patch that adds support of trace model for generation of visualIDs in qvto-bridge (17.46 KB, patch)
2012-01-26 06:16 EST, Guillaume Hillairet CLA
no flags Details | Diff
Tests for related patch (41.49 KB, patch)
2012-01-26 06:16 EST, Guillaume Hillairet CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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