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

Bug 349135

Summary: [Compatibility] Dirty parts in detached windows will not be saved when resetting a perspective
Product: [Eclipse Project] e4 Reporter: Remy Suen <remy.suen>
Component: UIAssignee: Remy Suen <remy.suen>
Status: RESOLVED FIXED QA Contact: Remy Suen <remy.suen>
Severity: critical    
Priority: P3 CC: Mike_Wilson
Version: 1.0Flags: Mike_Wilson: pmc_approved+
emoffatt: review+
Target Milestone: 4.1 RC4   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
WorkbenchPage patch v1 none

Description Remy Suen CLA 2011-06-11 20:46:51 EDT
1. Open an editor.
2. Detach it.
3. Make it dirty.
4. Window > Reset Perspective > OK
5. No prompt is made for the dirty editor resulting in data loss. Broken as of v1.178 of WorkbenchPage for the fix to bug 341010.
Comment 1 Remy Suen CLA 2011-06-13 11:34:43 EDT
Created attachment 197896 [details]
WorkbenchPage patch v1

The change here is to move the part saving code to the top of the reset call. We ignore editors inside the shared area and then prompt to save all other parts that are in the current perspective. This could mean that parts that will still be there after the reset are prompted but I believe this to be a minor inconvenience compared to the potential data loss our users will be facing without any changes.
Comment 2 Eric Moffatt CLA 2011-06-13 13:41:23 EDT
Patch looks OK as long as we test for edges like a single dirty editor in a DW...

Post-4.1 release we should take another look at this area; for example is the 'hideLocalPlaceholders' call still necessary?
Comment 3 Remy Suen CLA 2011-06-13 14:30:03 EDT
(In reply to comment #1)
> Created attachment 197896 [details]
> WorkbenchPage patch v1

Patch released to CVS HEAD.