|[Xpand] Cannot access eAnnotations of EEnumLiteral [message #533056]
||Wed, 12 May 2010 06:52
Originally posted by: dhendriksREMOVE_THIS.tueREMOVE.THIS.nl|
using this Xpand fragment:
«DEFINE expELiterals FOR EEnum-»
«FOREACH eLiterals AS lit-»
I'm trying to expand an Ecore to some text. I need to access the
eAnnotations of the EEnumLiterals of an EEnum. However, when I execute
the workflow, I get:
934 ERROR AbstractExpressionsUsingWorkflowComponent - Error in
Component of type org.eclipse.xpand2.Generator:
EvaluationException : Couldn't find property 'eAnnotations' for type
934 ERROR WorkflowRunner - Workflow interrupted. Reason: Couldn't
find property 'eAnnotations' for type cif::ActionDirections
Statically everything is OK, but at runtime the errors pop up.
The input model is cif.ecore, which contains an enumeration called
'ActionDirections'. For some reason variable 'lit' seems to be the
enumeration type defined in cif.ecore instead of an instance of
EEnumLiteral, or at least that's what the printed representation
indicates. «EEnumLiteral.isInstance(lit)» evaluates to true, so 'lit'
does seem to be an EEnumLiteral, but I can't access the 'name',
'literal', 'instance', 'eAnnotations', etc structural features. About
the only thing I can do, is call toString() on it...
Does anyone know how I can access the structural features of
EEnumLiterals from Xpand/Xtend, in particular the eAnnotations?
Any help would be greatly appreciated.
Powered by FUDForum
. Page generated in 0.13717 seconds