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

Bug 418542

Summary: Remove unused profile from migrated model = crash, applied stereotypes gone.
Product: [Modeling] Papyrus Reporter: Toni Siljamäki <toni.siljamaki>
Component: CoreAssignee: Project Inbox <mdt-papyrus-inbox>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: cletavernier, papyrus-bugs
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 408491    
Bug Blocks:    
Attachments:
Description Flags
Reproducible test case none

Description Toni Siljamäki CLA 2013-10-02 13:53:02 EDT
Created attachment 236047 [details]
Reproducible test case

Here is a model migration use case & test case.
Attached project has a slightly updated model compared to Bug 418478.

The use case is;
1) a model+profiles exported from one UML tool (= not Papyrus)
2) create Papyrus runtime versions of needed profiles
3) import the model, now having locally applied profiles
4) switch to runtime profiles created in step 2 above (see Bug 408491)
5) remove locally applied profiles not needed

This can also assist in understanding outstanding issues related to Bug 408491.

Attached is a plug-in project containing the needed profile and a test model.

1) Generate the profiles plugin.
2) Restart.
3) Open the model in the "model" folder.
   It has an applied local XYZProfile
   (the same as in the generated plugin)
   plus an applied XYZDeployProfile.
4) Switch the XYZProfile to the runtime version of it,
   using the function described in Bug 408491.
5) Remove the XYZDeployProfile. (it is not needed by the model)

After step 5 all applied stereotypes have vanished from the model.
Comment 1 Christian Damus CLA 2014-04-03 16:47:02 EDT
I think this problem happens as a result of bug 408491.  The profile switch, as currently implemented, is what actually corrupts the stereotype applications in the model.  I don't think there's a new bug here; there is only the unfinished 408491.
Comment 2 Toni Siljamäki CLA 2015-04-10 05:58:58 EDT
I close this issue, which appears to have been fixed.