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

Bug 430121

Summary: Unexpected behavior when escaping the save dialog
Product: [Modeling] Sirius Reporter: Laurent Redor <laurent.redor>
Component: CoreAssignee: Laurent Redor <laurent.redor>
Status: CLOSED FIXED QA Contact: Pierre-Charles David <pierre-charles.david>
Severity: normal    
Priority: P3 CC: pierre-charles.david
Version: 0.9Keywords: triaged
Target Milestone: 1.0.0M7   
Hardware: All   
OS: All   
Whiteboard:

Description Laurent Redor CLA 2014-03-11 12:53:01 EDT
When you close a dirty editor, a save dialog is displayed with the following choices : "Yes", "No" or "Cancel".
If you click on the escape key, or if you close this dialog (with the cross in the title bar), a save is done and the editor is closed, as if you choose "Yes".

The result should be equivalent to the "Cancel" button.
Comment 1 Laurent Redor CLA 2014-03-11 12:55:11 EDT
The problem is in org.eclipse.sirius.common.ui.tools.api.util.SWTUtil.openSaveDialog(String, boolean, Map<String, Integer>, boolean). There is a confusion between IDialogConstants and ISaveablePart2 constants.
Comment 2 Laurent Redor CLA 2014-03-11 13:05:11 EDT
Waiting review of https://git.eclipse.org/r/#/c/23208/ for 1.0 M7 target milestone
Comment 3 Laurent Redor CLA 2014-03-20 05:40:17 EDT
Fixed through commit 361e0eccf42054b056fe5528392ac953be0714b4: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=361e0eccf42054b056fe5528392ac953be0714b4
Comment 4 Pierre-Charles David CLA 2014-05-05 07:09:54 EDT
Verified on 1.0.0M7rc1 (1.0.0.20405030833).
Comment 5 Pierre-Charles David CLA 2014-05-12 03:45:39 EDT
Available in Sirius 1.0.0M7 (see https://wiki.eclipse.org/Sirius/1.0.0M7 & http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/tag/?id=v1.0.0M7).