[Xpand] EXPAND problem [message #642049] |
Mon, 29 November 2010 16:52 |
Luca Gherardi Messages: 62 Registered: November 2010 |
Member |
|
|
Hi,
I have a problem with xpand.
I have 2 ecore metamodel. The Scene metamodel includes the star metamodel.
This is my pwt file:
«IMPORT Scene»
«IMPORT Star»
«DEFINE Main FOR Scene::SceneMetamodel»
«FILE (name == null ? "SceneModel" : name) + ".star"-»
<?xml version="1.0" encoding="UTF-8" ?>
<Star version="1.1.1">
<models_library>
«FOREACH models AS model-»
«EXPAND parseModel FOREACH models»
«ENDFOREACH-»
</models_library>
</Star>
«ENDFILE»
«ENDDEFINE»
«DEFINE parseModel FOR Star::StarMetamodel»
«FOREACH abc.abcs AS def-»
...
...
...
«ENDFOREACH-»
«ENDDEFINE»
and this is my mwe:
<?xml version="1.0"?>
<workflow>
<property name="model" value="platform:/resource/star.metamodel/instances/default.scene_model"/>
<property name="out" value="out" />
<!-- set up EMF for standalone execution -->
<bean class="org.eclipse.emf.mwe.utils.StandaloneSetup">
<platformUri value="../" /> </bean>
<component class="org.eclipse.emf.mwe.utils.Reader">
<uri value="${model}" />
<modelSlot value="model" />
</component>
<!-- generate code -->
<component class="org.eclipse.xpand2.Generator">
<metaModel id="mm" class="org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel"/>
<expand value="templates::scene2xml::Main FOR model" />
<outlet path="${out}"/> </component>
</workflow>
Finally I report the error:
...
GRAVE: Error in Component of type org.eclipse.xpand2.Generator:
EvaluationException : No Definition 'parseModel for Star::StarMetamodel' found!
templates::scene2xml.xpt[277,32] on line 12 'EXPAND paeseModel FOREACH models'
[23,43] on line 1 'EXPAND templates::scene2xml::Main FOR model'
...
Can someone help me??
Thanks,
Luca
[Updated on: Tue, 30 November 2010 13:50] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03204 seconds