Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 349135 - [Compatibility] Dirty parts in detached windows will not be saved when resetting a perspective
Summary: [Compatibility] Dirty parts in detached windows will not be saved when resett...
Status: RESOLVED FIXED
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 1.0   Edit
Hardware: All All
: P3 critical (vote)
Target Milestone: 4.1 RC4   Edit
Assignee: Remy Suen CLA
QA Contact: Remy Suen CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-11 20:46 EDT by Remy Suen CLA
Modified: 2011-06-13 14:30 EDT (History)
1 user (show)

See Also:
Mike_Wilson: pmc_approved+
emoffatt: review+


Attachments
WorkbenchPage patch v1 (4.23 KB, patch)
2011-06-13 11:34 EDT, Remy Suen CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.