XPand2 extension problem [message #896688] |
Thu, 19 July 2012 11:51 |
Alan DW Messages: 119 Registered: March 2012 |
Senior Member |
|
|
Hello everyone,
I'm running an MWE workflow with an Xpand2 generator in it.
Here's the important part of the .mwe file:
<component id="generator" class="org.eclipse.xpand2.Generator" skipOnErrors="true">
<metaModel class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
<metaModelPackage value="org.eclipse.emf.ecore.EcorePackage"/>
</metaModel>
<metaModel class="org.eclipse.xtend.typesystem.uml2.UML2MetaModel">
</metaModel>
<expand value="Root::Root FOR model"/>
<fileEncoding value="ISO-8859-1"/>
<outlet path="${baseDir}src-gen">
<postprocessor class="org.eclipse.xpand2.output.JavaBeautifier"/>
</outlet>
</component>
... and in the Root.xpt file, the first line is this one:
«EXTENSION template::GeneratorExtensions»
Finally, the file "template/GeneratorExtensions.ext" looks like this:
String xmiID(emf::EObject x) :
JAVA template.Extensions.xmiId(org.eclipse.emf.ecore.EObject);
String typename(emf::EObject x) :
JAVA template.Extensions.dataTypeName(org.eclipse.uml2.uml.Type);
Boolean isSuperClass(emf::EObject x) :
JAVA template.Extensions.isSuperClass(org.eclipse.emf.ecore.EObject) ;
Boolean isNameOfPrimitivType(String x) :
JAVA template.Extensions.isNameOfPrimitivType(java.lang.String) ;
Now, the problem is that whenever I try to call one of the methods described in the GeneratorExtensions.ext file, I get an exception which looks like this:
[ERROR] Generator - template.Extensions.isSuperClass(org.eclipse.emf.ecore.EObject) not found, problems were:
[AnalysationIssueType not found] - Couldn't find Java type template.Extensions : template.Extensions
<EvaluationException : template.Extensions.isSuperClass(org.eclipse.emf.ecore.EObject) not found, problems were:
[AnalysationIssueType not found] - Couldn't find Java type template.Extensions : template.Extensions
template::GeneratorExtensions.ext[200,111] on line 5 'Boolean isSuperClass(emf::EObject x)'
Does anybody have an idea why the extension cannot be resolved correctly? The extension file is stored in "ProjectRoot/template/GeneratorExtensions.ext", so the generator should find it... Or do I need to add it in a particular way to my project?
If it is of any relevance, I'm running this code in a standalone Java application outside Eclipse.
Any help or hint on this would be appreciated, I'm really stuck here...
Thanks,
Alan
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02976 seconds