Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 322125 - "EAnnotation.eContainer()" does not work with EMF 2.6
Summary: "EAnnotation.eContainer()" does not work with EMF 2.6
Status: CLOSED INVALID
Alias: None
Product: OCL
Classification: Modeling
Component: Core (show other bugs)
Version: 3.0.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: OCL Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-09 07:26 EDT by Florian Thienel CLA
Modified: 2011-05-27 02:59 EDT (History)
1 user (show)

See Also:


Attachments
This test case runs fine with EMF 2.4 and fails with EMF 2.6 (1.38 KB, application/octet-stream)
2010-08-09 07:26 EDT, Florian Thienel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Thienel CLA 2010-08-09 07:26:34 EDT
Created attachment 176147 [details]
This test case runs fine with EMF 2.4 and fails with EMF 2.6

The attached test case runs fine with EMF 2.4. With EMF 2.6 the result of getEAllOperations of the EClass "EAnnotation" does not include the operation
"eContainer" and other operations. The OCL interpreter uses getEAllOperations to find the operation, this fails with EMF 2.6.

Although the Ecore inheritence hierarchy has changed according to Bug 322005, it should be possible use "eContainer" with OCL.
Comment 1 Ed Willink CLA 2010-08-09 12:24:17 EDT
I'm sorry, Florian, this chgange in 3.6M4 came as a surprise to me too, but I eventually recognised that it was arguably a big fix. There has never been any justification for eContainer() to work, since OCL should support OMG UML behavior.

It is not even reasonable to expect that container() work since OCL does not support MOF reflection. There is an OMG issue in progress for this, which MDT/OCL will pioneer/track.

MDT/OCL does provide a workaround. See http://wiki.eclipse.org/MDT/OCL/FAQ#How_do_I_invoke_methods_such_as_eContainer.28.29.2C_eContents.28.29.2C_eGet.28.29.3F
Comment 2 Florian Thienel CLA 2010-08-09 16:34:05 EDT
(In reply to comment #1)
Thanks anyway. At least there is a way around this issue.
Comment 3 Ed Willink CLA 2011-05-27 02:59:38 EDT
Closing INVALIDs