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

Bug 314834

Summary: Wizard for creation of .di/.notation from existing .uml file empties .uml file
Product: [Modeling] Papyrus Reporter: Ansgar Radermacher <ansgar.radermacher>
Component: CoreAssignee: Tatiana Fesenko <tatiana.fesenko>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: P3 CC: rschnekenburger, tatiana.fesenko
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:
Bug Depends on: 315300, 315083, 317156, 317158    
Bug Blocks: 317450    
Attachments:
Description Flags
Initial patch rschnekenburger: iplog+

Description Ansgar Radermacher CLA 2010-05-28 05:35:00 EDT
Build Identifier: Build id: 20100506-2000

When the Papyrus wizard for the creation of an .di/.notation from an existing .uml file is used, the latter is re-created as an empty model, i.e. the contents of the existing .uml file is lost!

Reproducible: Always

Steps to Reproduce:
1. Select an existing uml file (e.g. made with Papyrus 1.x)
2. Choose "New Papyrus Model" wizard
=> "Create a new Papyrus model from an existing semantic model"
3. Next leads to option "Create new model" vs "initialize from template"
This option should not appear in case of re-creation from existing model (maybe careful users would cancel at this point).
4. Terminate the wizard
=> Existing model is emptied
Comment 1 Tatiana Fesenko CLA 2010-06-01 12:39:59 EDT
Created attachment 170658 [details]
Initial patch
Comment 2 Tatiana Fesenko CLA 2010-06-01 13:03:42 EDT
(In reply to comment #1)
> Created an attachment (id=170658) [details]
> Initial patch
This bug was caused bug 315083 'ModelSet: Allow to create .di and .notation models only, and do not create a domain model'. The ModelSet creates new resources for all three models (.di, .notation and .uml). It means, that the existing UML resource is overriden with the newly created one. 

This patch solves the problem - it is possible to create a new Papyrus Model from the existing UML model and the existing model won't be modified. But! It has workaraund for bug 315083. As soon as bug 315083 is fixed the workaround code should be deleted.
Comment 3 Tatiana Fesenko CLA 2010-06-01 13:05:21 EDT
Remi, could you commit the patch =)
Comment 4 Remi Schnekenburger CLA 2010-06-01 13:12:32 EDT
(In reply to comment #3)
> Remi, could you commit the patch =)

Applied in r1756.
Thanks, Tatiana!
Comment 5 Tatiana Fesenko CLA 2010-06-07 06:28:00 EDT
Fixed
Comment 6 Ansgar Radermacher CLA 2010-06-20 15:33:58 EDT
It is no longer possible to create a new .di from an existing .uml file. This is a very important feature, as long as no conversion from Papyrus 1.x to MDT exists.
Comment 7 Tatiana Fesenko CLA 2010-07-12 03:57:55 EDT
(In reply to comment #6)
> It is no longer possible to create a new .di from an existing .uml file. This
> is a very important feature, as long as no conversion from Papyrus 1.x to MDT
> exists.

Fixed. I double-checked it in the todays build - works fine