eclipse-ocl / org.eclipse.ocl

Eclipse Public License 2.0
0 stars 0 forks source link

"EAnnotation.eContainer()" does not work with EMF 2.6 #583

Closed eclipse-ocl-bot closed 1 month ago

eclipse-ocl-bot commented 1 month ago

| --- | --- | | Bugzilla Link | 322125 | | Status | CLOSED INVALID | | Importance | P3 normal | | Reported | Aug 09, 2010 07:26 EDT | | Modified | May 27, 2011 02:59 EDT | | Version | 3.0.0 | | Reporter | Florian Thienel |

Description

Created attachment 176147\ 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.

EAnnotationContainerTest.java

eclipse-ocl-bot commented 1 month ago

By Ed Willink on Aug 09, 2010 12:24

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

eclipse-ocl-bot commented 1 month ago

By Florian Thienel on Aug 09, 2010 16:34

(In reply to comment #1)\ Thanks anyway. At least there is a way around this issue.

eclipse-ocl-bot commented 1 month ago

By Ed Willink on May 27, 2011 02:59

Closing INVALIDs