[Xtend] Using EEnum Literals within Xtend expressions [message #545947] |
Fri, 09 July 2010 12:40  |
Eclipse User |
|
|
|
So in my Ecore metamodel (Name / Ns Prefix "hl_dsp_pimm_02") I have an EEnum called "DataType".
It has "EEnum Literals" such as "Float", "Sint16", etc.
I require access to these enum literals within my Xtend model transformation.
That is I have an expression such as
let someDataType = hl_dsp_pimm_02::DataType::SINT16 :
When I try to run my workflow, I get the following exception ...
EvaluationException : Couldn't find enum literal or type 'hl_dsp_pimm_02::DataType::SINT16'
... even though I have imported hl_dsp_pimm_02 in my Xtend file, and even though I can work with any other meta model elements such as my hl_dsp_pimm_02's EClasses, EReferences etc.
Any ideas on how to access EEnum literals?
Thank you all once again!
|
|
|
|
Re: [Xtend] Using EEnum Literals within Xtend expressions [message #546059 is a reply to message #546036] |
Sat, 10 July 2010 11:13  |
Eclipse User |
|
|
|
Hello Christian,
thank you very much, it seems that your hint solved my problem!
The problem was I used hl_dsp_pimm_02::DataType::SINT16 where I should have used hl_dsp_pimm_02::DataType::Sint16
... That is, you mustn't use the spelling as hinted in the enum type of the auto-generated Java file (SINT16), but you have to use the same case-sensitive writing of the EEnum Literal as written in its "name" property (Sint16).
|
|
|
Powered by
FUDForum. Page generated in 0.03975 seconds