Closed eclipse-ocl-bot closed 3 hours ago
By Ed Willink on Dec 06, 2009 04:34
In https://bugs.eclipse.org/bugs/show_bug.cgi?id=202611#c3 Christian expressed surprise that eContents() could be used, and felt it unfortunate that EModelElement inherited from EObject. The EMF chnage is therefore in accord with convergence on the OCL standard.
To avoid build failures CollectionsTest.test_valueOfOperationTypedByEEList_202611 has been commented out, with a FIXME. It needs re-instating in a legal fashion.
By Ed Willink on Dec 06, 2009 11:42
In https://bugs.eclipse.org/bugs/show_bug.cgi?id=202611#c3 Christian expressed surprise that eContents() could be used, and felt it unfortunate that EModelElement inherited from EObject. The EMF chnage is therefore in accord with convergence on the OCL standard.
To avoid build failures CollectionsTest.test_valueOfOperationTypedByEEList_202611 has been commented out, with a FIXME. It needs re-instating in a legal fashion.
By Ed Willink on Mar 30, 2010 16:46
Created attachment 163457 Reinstatement of suppressed test
Attached sets IMPLICIT_ROOT_CLASS in order to make eContents() accessible.
We therefore have a general workaround: eXXX usage now requires
ParsingOptions.setOption(ocl.getEnvironment(), ParsingOptions.implicitRootClass(ocl.getEnvironment()), EcorePackage.Literals.EOBJECT);
whether the meta-model inherits EObject or not.
:notepad_spiral: Bug297011.patch
By Ed Willink on Apr 23, 2010 00:50
Committed to CVS HEAD.
By Ed Willink on May 27, 2011 02:54
Closing
| --- | --- | | Bugzilla Link | 297011 | | Status | CLOSED FIXED | | Importance | P3 major | | Reported | Dec 06, 2009 02:00 EDT | | Modified | May 27, 2011 02:54 EDT | | Blocks | 290103 | | Reporter | Ed Willink |
Description
The EMF changes making EObject inheritance less obvious require that MDT/OCL introduce a mechanism to exploit EObject. This will render the need to manipulate IMPLICIT_ROOT_CLASS obsolete.
Suggest that xxx.oclAsType(ecore::EObject) give the intuitively obvious behaviour even though EObject may not appear to be a supertype of xxx in the meta-model. xxx.oclIsKindOf(ecore::EObject) should return false unless the inheritance of EObject is explicit in the meta-model.
This then requires that a binding from ecore:: is established by the user. This is already done by the different Ecore/UML2 registry set-ups, and can be more explicit once the Model Registry is in place.