| [Acceleo] Problem xmi reference to another xmi [message #985539] |
Thu, 15 November 2012 08:32  |
Guillaume Lincé Messages: 6 Registered: November 2012 |
Junior Member |
|
|
Hello,
As I have already explained in this topic (http://www.eclipse.org/forums/index.php/t/430863/), we use Acceleo to generate html from two models (TVL and FCSS). The FCSS xmi has references to the TVL xmi. We load the TVL model as an argument to the project then load the FCSS model programmatically (using an invoke to a java method). We have to load the TVL xmi firt since the FCSS model is optional. We managed to resolve the references from the FCSS XMI to the TVL XMI. However, it seems that the acceleo project uses another instance of the TVL xmi and therefore the references used in FCSS XMI instance don't match with TVL XMI elements loaded by Acceleo. For example, when we try to compare a Hierarchical_Feature (a model element in TVL) and the reference to this model element in FCSS:
<p>reference: [feature.feature.head/]</p>
<p>hierarchical: [aHierarchicalFeature/]</p>
<p>Equals? [feature.feature.head = aHierarchicalFeature/]</p>
We get this result:
reference: be.ac.fundp.info.tVL.impl.Hierarchical_FeatureImpl@66fe372d (name: SWR) (optional: false)
hierarchical: be.ac.fundp.info.tVL.impl.Hierarchical_FeatureImpl@3f328d2e (name: SWR) (optional: false)
Equals? false
As you can see, they are not equal although they should be.
What can we do to solve this issue?
Thanks for you help,
Guillaume
|
|
|