Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 410749 - [Workbench] Don't prompt to save on close when editor input opened elsewhere
Summary: [Workbench] Don't prompt to save on close when editor input opened elsewhere
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.3   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.2.2+   Edit
Assignee: Wojciech Sudol CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 355874 438308 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-06-13 12:24 EDT by Markus Keller CLA
Modified: 2017-03-02 09:59 EST (History)
5 users (show)

See Also:
daniel_megert: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2013-06-13 12:24:37 EDT
4.3.0.I20130605-2000, was fine in 3.8

- open an editor
- make it dirty
- Window > New Editor
- close duplicate dirty editor

3.8 nicely told me that the resource is still opened elsewhere and that clicking "No" in the "Save Resource" dialog will not lose changes.

There's also an option for that on the General > Editors preference page:
[] Prompt to save on close even if still opened elsewhere

In 4.x, I just get the generic Save dialog and the preference is broken.
Comment 1 Dani Megert CLA 2014-06-30 05:43:35 EDT
*** Bug 438308 has been marked as a duplicate of this bug. ***
Comment 2 Dani Megert CLA 2014-06-30 05:49:22 EDT
*** Bug 355874 has been marked as a duplicate of this bug. ***
Comment 3 Dani Megert CLA 2014-06-30 05:51:23 EDT
Also need to make sure the same dialog is used when indirectly closing the dirty editor by closing the window with Ctrl+W or via [x].
Comment 4 Dani Megert CLA 2014-06-30 05:51:45 EDT
Wojciech, please take a look.
Comment 5 Dani Megert CLA 2014-07-02 05:55:47 EDT
(In reply to Dani Megert from comment #4)
> Wojciech, please take a look.

If the bug regarding closing the editor (new in 4.x) and the one closing the window (already exists 3.x) have a different fix, then please attach two separate fixes.
Comment 6 Wojciech Sudol CLA 2014-07-16 08:33:08 EDT
(In reply to Markus Keller from comment #0)
> In 4.x, I just get the generic Save dialog and the preference is broken.

The "editor/editors opened elsewhere" dialogs do appear when the close/closeAll actions are triggered by a keyboard shortcut, so the 'core' mechanism seems to work fine.
Comment 7 Dani Megert CLA 2014-08-15 07:57:01 EDT
Ping!
Comment 8 Wojciech Sudol CLA 2014-08-18 09:41:57 EDT
Fix proposition: https://git.eclipse.org/r/31819
Comment 9 Dani Megert CLA 2014-08-19 08:05:19 EDT
(In reply to Wojciech Sudol from comment #8)
> Fix proposition: https://git.eclipse.org/r/31819

This addresses the originally reported problem. We'll handle the scenario that involves closing the window and that is also broken in 3.x via bug 169947.
Comment 10 Wojciech Sudol CLA 2014-08-19 09:58:30 EDT
Patch with the bundle version update: https://git.eclipse.org/r/31890
Comment 11 Dani Megert CLA 2014-08-19 14:34:15 EDT
(In reply to Wojciech Sudol from comment #8)
> Fix proposition: https://git.eclipse.org/r/31819

This fix also fixes the prompt when using editorTab > Close All and Close Others.

Submitted to master with http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=7a77d4ef52685735b545074cfac6c2e61a617524
Comment 12 Dani Megert CLA 2014-08-19 14:35:24 EDT
+1 for 4.4.1.
Comment 13 Wojciech Sudol CLA 2014-08-20 09:15:24 EDT
Gerrit's review link for the R4_4_maintenance branch: https://git.eclipse.org/r/31966 .
Comment 14 Dani Megert CLA 2014-08-21 04:43:45 EDT
(In reply to Wojciech Sudol from comment #13)
> Gerrit's review link for the R4_4_maintenance branch:
> https://git.eclipse.org/r/31966 .

Submitted with http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=79384c9cc56d880ba39c1cf2f45369febfbe7464

Verified that the bundle versions are correct in 4.4.1.
Comment 15 Dani Megert CLA 2014-08-21 11:10:07 EDT
From Wojciech:
"
Here is the patch for 4.3.2+ https://git.eclipse.org/r/#/c/32053/

Also here is the patch with version update (I know you mentioned to not use Gerrit for that, but this is "special" situation) - https://git.eclipse.org/r/32055 .
In 4.3.2 build (packages) the versions are 3.105.2 and 0.11.2 .
"
Comment 16 Dani Megert CLA 2014-08-21 11:11:09 EDT
(In reply to Dani Megert from comment #15)
> From Wojciech:
> "
> Here is the patch for 4.3.2+ https://git.eclipse.org/r/#/c/32053/
> 
> Also here is the patch with version update (I know you mentioned to not use
> Gerrit for that, but this is "special" situation) -
> https://git.eclipse.org/r/32055 .
> In 4.3.2 build (packages) the versions are 3.105.2 and 0.11.2 .
> "

Submitted with http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=01f89c32b12063048f5df32db16eaf9feaf0ef71

and http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=35844c7aff7553fb704ff8b8078c4067a13875f0
Comment 17 Wojciech Sudol CLA 2014-08-21 12:10:00 EDT
Review link for the R4_2_maintenance branch : https://git.eclipse.org/r/32073 .

Review link for required bundle version update in the R4_2_maintenance branch: https://git.eclipse.org/r/32086 .
Comment 18 Dani Megert CLA 2014-08-22 06:34:29 EDT
(In reply to Wojciech Sudol from comment #17)
> Review link for the R4_2_maintenance branch :
> https://git.eclipse.org/r/32073 .
> 
> Review link for required bundle version update in the R4_2_maintenance
> branch: https://git.eclipse.org/r/32086 .

Submitted with http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=1b0b96eb25ece91ad348e012b3fee2589b66426f

and http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=1858fe328a514267c65540627ab22c8cd6aa226b
Comment 19 Wojciech Sudol CLA 2014-09-04 04:26:38 EDT
Verified in 4.4.1 RC3 (M20140903-1600).
Comment 20 Wojciech Sudol CLA 2014-09-16 05:39:04 EDT
Verified in 4.5 M2 candidate (I20140915-2000).
Comment 21 Wojciech Sudol CLA 2014-09-17 10:29:12 EDT
This fix has solved two other issues: bug 443263 and bug 428664.