[xTend] GLOBALVAR causes exception [message #519125] |
Sat, 06 March 2010 15:33  |
Eclipse User |
|
|
|
Originally posted by: m_lehmeier.gmx.de
Hello.
After migrating from Openarchitectureware to MWE I can't define a
globalVarDef anymore.
My workflow looks like this:
My workflow looks like this:
<component class="org.eclipse.xpand2.Generator">
<fileEncoding value="UTF-8"/>
<metaModel idRef="mm.framework"/>
<expand value="com::lm::visage::m2t::framework::Pojo::main FOR
frameworkModel"/>
<globalVarDef name="javaPackage" value="com.test.something" />
</component>
I access this global var in an Xtension file by this simple function:
String packageName() : GLOBALVAR javaPackage;
As soon as that function is called, I get the following Exception:
Mar 6, 2010 9:29:45 PM
org.eclipse.xtend.expression.AbstractExpressionsUsingWorkflo wComponent
invokeInternal
SEVERE: Error in Component of type org.eclipse.xpand2.Generator:
EvaluationException : Couldn't find type or property 'com'
nofile[0,3] on line 1 'com'
I'm not sure to proceed.
Of course I don't have to define this global, I but I would prefer to.
Can anybody tell me what I did wrong?
Thanks!
--
Lehmeier Michael
|
|
|
Re: [xTend] GLOBALVAR causes exception [message #519162 is a reply to message #519125] |
Sun, 07 March 2010 10:29  |
Eclipse User |
|
|
|
The text in value is interpreted as an expression an id evaluated
against the workflow context.
If you want to pass a string, you need to set the value in quotes:
<globalVarDef name="javaPackage" value="'com.test.something'" />
Sven
Michael Lehmeier schrieb:
> Hello.
>
> After migrating from Openarchitectureware to MWE I can't define a
> globalVarDef anymore.
>
> My workflow looks like this:
>
> My workflow looks like this:
>
> <component class="org.eclipse.xpand2.Generator">
> <fileEncoding value="UTF-8"/>
> <metaModel idRef="mm.framework"/>
> <expand value="com::lm::visage::m2t::framework::Pojo::main FOR
> frameworkModel"/>
> <globalVarDef name="javaPackage" value="com.test.something" />
> </component>
>
> I access this global var in an Xtension file by this simple function:
>
> String packageName() : GLOBALVAR javaPackage;
>
> As soon as that function is called, I get the following Exception:
>
> Mar 6, 2010 9:29:45 PM
> org.eclipse.xtend.expression.AbstractExpressionsUsingWorkflo wComponent
> invokeInternal
> SEVERE: Error in Component of type org.eclipse.xpand2.Generator:
> EvaluationException : Couldn't find type or property 'com'
> nofile[0,3] on line 1 'com'
>
> I'm not sure to proceed.
> Of course I don't have to define this global, I but I would prefer to.
> Can anybody tell me what I did wrong?
>
> Thanks!
>
--
Need professional support for Xtext and EMF?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : blog.efftinge.de
|
|
|
Powered by
FUDForum. Page generated in 0.02801 seconds