Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » XPand: No definition Found
XPand: No definition Found [message #1050086] Fri, 26 April 2013 17:23
Jaime Ferrer is currently offline Jaime FerrerFriend
Messages: 1
Registered: April 2013
Junior Member
Hello.

I created a project in Xpand to generate a set of HTML files from a .Ecore.

The problem is that I continually receive the following error:

Quote:
1722 ERROR AbstractExpressionsUsingWorkflowComponent - Error in Component generator of type org.eclipse.xpand2.Generator:
EvaluationException : No Definition 'ProcesaApps for shmapps::Apps' found!
templates::MainTemplate.xpt[88,27] on line 7 'EXPAND ProcesaApps FOR apps'
[23,46] on line 1 'EXPAND templates::MainTemplate::Root FOR model'

1723 ERROR WorkflowEngine - Workflow interrupted. Reason: No Definition 'ProcesaApps for shmapps::Apps' found!
1723 ERROR WorkflowEngine - [ERROR]: No Definition 'ProcesaApps for shmapps::Apps' found!(Element: EXPAND ProcesaApps FOR apps; Reported by: Generator(generator): generating 'templates::MainTemplate::Root FOR model' => src-gen/)
1724 ERROR WorkflowEngine - [ERROR]: No Definition 'ProcesaApps for shmapps::Apps' found!(Element: Root : SmartHomeSpecification; Reported by: Generator(generator): generating 'templates::MainTemplate::Root FOR model' => src-gen/)
1724 ERROR WorkflowEngine - [ERROR]: No Definition 'ProcesaApps for shmapps::Apps' found!(Element: EXPAND templates::MainTemplate::Root FOR model; Reported by: Generator(generator): generating 'templates::MainTemplate::Root FOR model' => src-gen/)


However, if the definition is correctly written. Can anyone give me a hand?

Here is my Workflow:
Quote:
<workflow>
<property name="modelFile" value="My.smarthome"/>
<property name="metaModelPackage" value="org.pros.upv.es.model.smarthome.SmartHomePackage"/>
<property name="srcGenPath" value="src-gen"/>
<property name="fileEncoding" value="ISO-8859-1"/>

<component id="xmiParser"
class="org.eclipse.xtend.typesystem.emf.XmiReader">
<modelFile value="${modelFile}"/>
<metaModelPackage value="${metaModelPackage}"/>
<outputSlot value="model"/>
<firstElementOnly value="true"/>
</component>

<component id="generator"
class="org.eclipse.xpand2.Generator">
<metaModel id="mm"
class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
<metaModelPackage value="${metaModelPackage}"/>
</metaModel>
<expand value="templates::MainTemplate::Root FOR model"/>
<outlet path="${srcGenPath}/"/>
</component>
</workflow>


And Here is my template:
Quote:
«IMPORT smarthome»
«IMPORT shmapps»

«EXTENSION template::GeneratorExtensions»

«DEFINE Root FOR SmartHomeSpecification»
«EXPAND ProcesaApps FOR apps»
«ENDDEFINE»


«DEFINE ProcesaApps FOR shmapps::Apps»
«EXPAND ProcesaWebAppList FOR webAppList»
«ENDDEFINE»


«DEFINE ProcesaWebAppList FOR shmapps::WebAppList»
«EXPAND ProcesaWebApp FOREACH webApps»
«ENDDEFINE»

«DEFINE ProcesaWebApp FOR shmapps::WebApp»
«FILE "«Nombre.html"»

<H1>Documentación para la aplicación</H1>

«ENDFILE»


«ENDDEFINE»


I'm relatively new using XPand, so I do not know where the error may come.

PD: Sorry for my bad english Smile
Previous Topic:[acceleo] another acceleo standalone question
Next Topic:[Xpand/Xtend] Check File problem
Goto Forum:
  


Current Time: Sun Nov 23 18:58:08 GMT 2014

Powered by FUDForum. Page generated in 0.01523 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software