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

Bug 536995

Summary: User is not warned after the migration of a odesign or aird and cannot save without creating a change in the resource
Product: [Modeling] Sirius Reporter: Mathieu Cartaud <mathieu.cartaud>
Component: CoreAssignee: Project inbox <sirius.core-inbox>
Status: CLOSED FIXED QA Contact: Florian Barbin <florian.barbin>
Severity: enhancement    
Priority: P3 CC: florian.barbin, julien.dupont, laurent.fasani, laurent.redor, pierre-charles.david, pierre.guilet
Version: unspecified   
Target Milestone: 6.1.0   
Hardware: PC   
OS: Mac OS X   
See Also: https://git.eclipse.org/r/126008
https://git.eclipse.org/r/127017
https://git.eclipse.org/r/127033
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=58c75bfa8ff4b5bf149e61050b88ce679030cf6d
https://git.eclipse.org/r/127192
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=31aa54ba99b338abb4a4825381c9151284fff74d
https://git.eclipse.org/r/127413
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=f6e77cc3a601c5441693d910b2f868a0d77a8c3d
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=cfc8bb37541388d8e72810176476442c7f081b01
https://git.eclipse.org/r/130753
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=dc769b8fc3c4438b8578b4ad95c71b3b9964afbf
Whiteboard:
Attachments:
Description Flags
project to test none

Description Mathieu Cartaud CLA 2018-07-13 03:59:47 EDT
When opening an old version of an Odesign or an Aird resource with a recent version of Sirius, an automatic migration happens.
When the resource is then open in an editor or in the model explorer, it is not marked as dirty and thus cannot be saved.
As the user is not warned about the migration, he can open and close the file many times without modifying it and the migration will happen at each time, adding a cost to the resource opening.

A workaround for the user is to create a dummy change to make the file dirty and save the file.

It should be possible to warn the user about the migration and to offer him the possibility to save the migrated diagram easily.

User should be able to deactivate this new possibility to keep the old comportment.
The user should also be warned about migration only for those directly dues to the user action. For exemple, opening a diagram, unfolding the resource in the model explorer should leads warn the user, but a migration initiated by a M2Doc generation should not.
Comment 1 Eclipse Genie CLA 2018-07-13 04:09:53 EDT
New Gerrit change created: https://git.eclipse.org/r/126008
Comment 2 Eclipse Genie CLA 2018-08-03 05:01:01 EDT
New Gerrit change created: https://git.eclipse.org/r/127017
Comment 3 Eclipse Genie CLA 2018-08-03 09:41:04 EDT
New Gerrit change created: https://git.eclipse.org/r/127033
Comment 5 Eclipse Genie CLA 2018-08-08 09:46:04 EDT
New Gerrit change created: https://git.eclipse.org/r/127192
Comment 7 Eclipse Genie CLA 2018-08-14 10:02:30 EDT
New Gerrit change created: https://git.eclipse.org/r/127413
Comment 10 Julien Dupont CLA 2018-10-09 04:06:23 EDT
How to validate this issue?
Comment 11 Pierre Guilet CLA 2018-10-10 08:26:42 EDT
Created attachment 276200 [details]
project to test
Comment 12 Pierre Guilet CLA 2018-10-10 09:16:53 EDT
Steps to validate:

- check the sirius option "Ask to save resources for migration directly initiated by user"
- import attached project
- double click on the aird. A dialog ask you to save autmatic migration. Click no ,it opens its editor.
- Close the editor.
- double click on the aird. A dialog ask you to save autmatic migration. Click yes, it opens its editor.
- close aird editor
- open it again
- no dialog must ask you to save the session

Do the same steps for the VSM.
Comment 13 Eclipse Genie CLA 2018-10-10 09:20:42 EDT
New Gerrit change created: https://git.eclipse.org/r/130753
Comment 14 Pierre-Charles David CLA 2018-10-11 09:28:04 EDT
See https://git.eclipse.org/r/c/130753/
Comment 16 Pierre-Charles David CLA 2018-10-19 12:47:28 EDT
Available in Sirius 6.1.0, see https://wiki.eclipse.org/Sirius/6.1.0