Xpand: Cannot resolve the reference to a dependent model [message #500446] |
Thu, 26 November 2009 03:52  |
Eclipse User |
|
|
|
I am migrating from oaw4 to oaw5. I have a main model (formComposition) which references another model (dataMod) . When I run my xpand template, I cannot resolve the reference to the second model.
The xpand template :
«info("Hello mnp = "+this.relatedModels.relatedSecondM.get(0))»
«info("Hello mnp name = "+this.relatedModels.relatedSecondM.get(0).name)»
The result on the console:
Registering platform uri 'F:\nadege-galileo\WkGMF300'
...
22889 INFO IOExtensions - Hello mnp = org.eclipse.emf.ecore.impl.DynamicEObjectImpl@7f5580 (eProxyURI: file://F:/nadege-galileo/modele.second/src/model/secondMODEL E.datamod#/ eClass: org.eclipse.emf.ecore.impl.EClassImpl@55e55f (name: RootContent) (instanceClassName: null) (abstract: false, interface: false))
22889 INFO IOExtensions - Hello mnp name = null
The content of the referenced dataMod is not resolved (null) which is not so surprising because the eProxyURI, where it is looking for the model, is the following :
file://F:/nadege-galileo/modele.second/src/model/secondMODEL E.datamod
but the actual URI should be file://F:/nadege-galileo/WkGMF300/modele.second/src/model/se condMODELE.datamod
and the Registered platform URI is F:\nadege-galileo\WkGMF300.
Obviously the WkGMF300 is missing. What can I do to fix this problem ? Did I miss smthg while migrating?
Hereunder are my files:
The Ecore :
<eClassifiers xsi:type="ecore:EClass" name="RelatedModels">
<eStructuralFeatures xsi:type="ecore:EReference" name="relatedSecondM" eType="ecore:EClass ../../../dataMod_GMF/model/dataMod.ecore#//RootContent"/>
</eClassifiers>
The reference in the model:
<relatedModels name="">
<relatedSecondM href="../../../modele.second/src/model/secondMODELE.datamod#/ "/>
</relatedModels>
Note : If I change the reference in the model
from
../../../modele.second/src/model/secondMODELE.datamod
to
modele.second/src/model/secondMODELE.datamod
and move the corresponding file into the same location as my main model, I resolve the reference to the second model. The result in the console is
22889 INFO IOExtensions - Hello mnp name = second.
It also works if I insert an absolute reference to the second model
I have registered the ecore files at the beginning of my workflow:
<property name="build.basedir" value="platform:/resource"></property>
<property name="basedirfile" value="platform:/resource/${projectRoot}"></property>
<bean class="org.eclipse.emf.mwe.utils.StandaloneSetup">
<platformUri value=".."/>
<registerEcoreFile value=" ${build.basedir}/formComposition/src/ecore/formComposition.e core "/>
<registerEcoreFile value="${build.basedir}/dataMod_GMF/model/dataMod.ecore"/>
</bean>
Any ideas ?
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05764 seconds