|Re: eContainer() [message #47145 is a reply to message #47112]
||Thu, 20 December 2007 13:19
Originally posted by: cdamus.ca.ibm.com|
You can use eContainer() only if your model EClasses explicitly specialize
EObject (either directly or indirectly). Implementing EObject at the Java
level is insufficient, as OCL only considers the model.
Of course, this would change if and when
So, if you had
Control ------|> EObject
then you would be OK. But, then, you would be introducing an EClass into
your model solely for the purpose of OCL. Possibly a better solution would
be to give the Composite::children reference an eOpposite?
> I have my own ecore metamodel like the one attached.
> Can I use the method eContainer() from EObject to check if e.g. Text is
> contained by the 'Model' (root object)?
Powered by FUDForum
. Page generated in 0.05096 seconds