Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Re: eContainer in OCL Expression
Re: eContainer in OCL Expression [message #556762] Thu, 02 September 2010 14:39
Ed Merks is currently offline Ed MerksFriend
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/
Previous Topic:OCL 'source code' of an OCLExpression
Next Topic:OCL metamodel
Goto Forum:
  


Current Time: Tue Apr 23 15:18:47 GMT 2024

Powered by FUDForum. Page generated in 0.02417 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top