Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 369492

Summary: StereotypeApplicationCopier : bug when handling enums in static profiles
Product: [Modeling] MDT.UML2 Reporter: Mathieu Velten <mathieu.velten>
Component: CoreAssignee: Kenn Hussey <Kenn.Hussey>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: faure.tristan
Version: 3.2.0Flags: Kenn.Hussey: juno+
Target Milestone: 4.0.0   
Hardware: PC   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 365898    
Attachments:
Description Flags
patch none

Description Mathieu Velten CLA 2012-01-24 05:45:23 EST
Created attachment 209960 [details]
patch

Hi,

Using control mode in Papyrus we encountered an uml bug :
there is a problem with copyEEnumAttribute in the StereotypeApplicationCopier class when trying to copy a stereotype application linked to a static profile.

When a static profile is generated an enum literal is represented by a simple object which inherited Enumerator which is ok since the setters provided by EEnumLiteral are not needed here.

However the current code assumes that it inherited EEnumLiteral.

Patch attached to fix this.
Comment 1 Kenn Hussey CLA 2012-03-06 09:45:23 EST
While the attached patch may address your particular scenario but it won't work in migration scenarios (which is this code's main purpose). A correct fix has been committed and pushed to git. An integration build will be posted shortly.
Comment 2 Kenn Hussey CLA 2012-03-06 12:19:41 EST
An integration build containing this fix is now available.
Comment 3 Mathieu Velten CLA 2012-03-14 09:55:33 EDT
Thanks for your comments and push.