Re: eContainer in OCL Expression [message #556762] |
Thu, 02 September 2010 14:39 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Nimesh,
Maybe it's better to ask on the OCL newsgroup, which I've added to the
"to" list of this reply.
Nimesh wrote:
> Hi,
>
> I am unable to access eContainer in the OCL expression in GMF.
> Basically I need to write an expression as follows.
> ((Package)self.eContainer.eContainer).types.typeSelect(Prope
> rtyDefinition).get(1)
> I am trying to use the expression in Feature Seq Initializer. So in my
> current node the reference of PropertyDefinition (any one) needs to be
> set when it gets created.
>
> In the above expression it states self is undefined.
>
> I modify the expression to just state
> self.eContainer.eContainer.types.typeSelect(PropertyDefiniti
> on).get(1) it gives error that "Unrecognized variable: (eContainer)"
>
> I am using GMF 2.3. In my EntityOCLFactory.initCustomEnv following
> line does exists ParsingOptions.setOption(ecoreEnv,
> ParsingOptions.implicitRootClass(ecoreEnv),
> EcorePackage.eINSTANCE.getEObject());
> Is there something else that needs to be done apart from this?
>
> Thanks.
> Regards,
> - Nimesh
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02417 seconds