Bug 437099 - Repair action should not save the session when the user choice is No.
Summary: Repair action should not save the session when the user choice is No.
Status: CLOSED FIXED
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: 0.9   Edit
Hardware: PC Windows NT
: P3 major (vote)
Target Milestone: 2.0.0   Edit
Assignee: Maxime Porhel CLA
QA Contact:
URL:
Whiteboard: trivial
Keywords: triaged
Depends on:
Blocks: 437542
  Show dependency tree
 
Reported: 2014-06-11 04:17 EDT by Maxime Porhel CLA
Modified: 2014-11-05 04:11 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maxime Porhel CLA 2014-06-11 04:17:08 EDT
Repair action should not save the session when the user choice is No. In this case the expected behavior is to close the session without saving it. 

The issues comes from a wrong report. 
It has been introduced by commit 825388b5e120bfe30c75e8bf0539bf1736fadc23 (2013-09-18 09:58:41) Report recent code changes from the previous code base.

>  if (saveSessions) {
>   session.save();
>  }
>  session.close();

became 

>  if (saveSessions) {
>   session.save(new NullProgressMonitor());
>  }
>  session.save(new NullProgressMonitor());

instead of 

>  if (saveSessions) {
>   session.save(new NullProgressMonitor());
>  }
>  session.close(new NullProgressMonitor());

(as it was done in the Viewpoint repository, commit e4ba2e3c3989c89cb598e90d334523285809df35)
Comment 1 Maxime Porhel CLA 2014-06-11 04:27:32 EDT
See https://git.eclipse.org/r/28315
Comment 2 Maxime Porhel CLA 2014-06-16 11:21:09 EDT
Corrected by commit 3eb1bf031d64711399216968e119f890af8e9ed7
Comment 3 Maxime Porhel CLA 2014-08-18 04:59:31 EDT
Steps to reproduce: 
. Open/create a session an a sample model. 
. Open/create a diagram, save
. make a modification (move an element at the bottom right for example)
. do not save, the editor should be dirty
. right-clic on the aird -> repair
. clic on No when the action asks to save the session
. the repair is done
. reopen the diagram
. you must not see the modifications done after the save (step3). They must be reverted between choice No and repair.
Comment 4 Pierre-Charles David CLA 2014-10-27 06:52:22 EDT
Available in Sirius 2.0.0.
Comment 5 Pierre-Charles David CLA 2014-11-05 04:11:51 EST
Removing the "backport" tag; this was indeed backported to Sirius 1.0.1 as bug 437542.