Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 297011 - [analyzer,library] Provide access to EObject
Summary: [analyzer,library] Provide access to EObject
Status: CLOSED FIXED
Alias: None
Product: OCL
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows Vista
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: OCL Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 290103
  Show dependency tree
 
Reported: 2009-12-06 02:00 EST by Ed Willink CLA
Modified: 2011-05-27 02:54 EDT (History)
0 users

See Also:


Attachments
Reinstatement of suppressed test (1.61 KB, patch)
2010-03-30 16:46 EDT, Ed Willink CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Willink CLA 2009-12-06 02:00:09 EST
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.
Comment 1 Ed Willink CLA 2009-12-06 04:34:01 EST
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.
Comment 2 Ed Willink CLA 2009-12-06 11:42:19 EST
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.
Comment 3 Ed Willink CLA 2010-03-30 16:46:10 EDT
Created attachment 163457 [details]
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.
Comment 4 Ed Willink CLA 2010-04-23 00:50:45 EDT
Committed to CVS HEAD.
Comment 5 Ed Willink CLA 2011-05-27 02:54:20 EDT
Closing