|[Acceleo3] using ecore in query [message #666374]
||Wed, 20 April 2011 08:24
| Wilbert Alberts
Registered: June 2010
I created a meta model and am experimenting with code generation.
In this, I have a PG_Return meta class that either might occur inside a PG_Calc or a PG_GetCalc object. The generated code depends on the context PG_Return is used in. Therefore, I created a query that checks whether the context of the PG_Return instance is within PG_GetCalc.
[query public inGetCalcContext(s: PG_Statement) : Boolean =
let container: EObject = s.eContainer()
if (container <> null) and (container.oclIsTypeOf(PG_GetCalc))
if (container = null)
However, Acceleo complains that it doesn't know EObject? Is it not possible to use ecore concepts like above?
Powered by FUDForum
. Page generated in 0.02911 seconds