eclipse-ocl / org.eclipse.ocl

Eclipse Public License 2.0
0 stars 0 forks source link

[pivot-uml] Support allInstances for Stereotypes #1652

Closed eclipse-ocl-bot closed 1 hour ago

eclipse-ocl-bot commented 1 hour ago

| --- | --- | | Bugzilla Link | 485225 | | Status | RESOLVED FIXED | | Importance | P3 normal | | Reported | Jan 05, 2016 11:53 EDT | | Modified | Jan 08, 2016 11:10 EDT | | Reporter | Ed Willink |

Description

Bug 241148 resulted in support for Stereotype allInstances in Classic OCL.

It should be supported in Pivot OCL too.

OMG issue raised: http://issues.omg.org/browse/OCL25-205

eclipse-ocl-bot commented 1 hour ago

By Ed Willink on Jan 08, 2016 08:14

Although UML has no Stereotype instances, the XMI magic for Ecore has a DynamicEObject that satisfies the simple isInstance predicate hence the UML ProfileTest.test_allInstances_stereotype_241148 works.


Problem is that UML2AS fails to convert the EClass type of the DynamicEObject fails to convert to a pivot Stereotype since it is a UML to Pivot mapping.

Fortunately the UMLASResourceFactory.getASElement overload is there to solve precisely this problem with an Ecore to UML lookup preceding the UML to Pivot.


The fix is very simple so providing it for Mars.2 as well as Neon should be no problem.

eclipse-ocl-bot commented 1 hour ago

By Ed Willink on Jan 08, 2016 11:10

commit 814086d45672c5594a548dc73fadf1072461d640 pushed to maintenance/R6.0 for Mars.2

commit 1d2de8604705ad24f5d14e2f66001fe19ad36962 pushed to master for Neon M5.