Bug 35701 - [Editor Mgmt] Exiting Eclipse with a problem file caused loss of data for other files
Summary: [Editor Mgmt] Exiting Eclipse with a problem file caused loss of data for oth...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P2 critical (vote)
Target Milestone: 2.1.1   Edit
Assignee: Simon Arsenault CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 37786 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-03-26 09:56 EST by Duong Nguyen CLA
Modified: 2003-06-02 16:55 EDT (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 Duong Nguyen CLA 2003-03-26 09:56:57 EST
When there are several dirty models in the workbench and the user is exiting 
the workbench, there are cases that some of the files will not have the 
opportunity to save and will cause loss of data. The failure case occur if one 
of the editors with the dirty file attempts to abort the operation for some 
reason (eg. unable to save the file).

Below are the steps to demonstrate the problem using text files but this is not 
necessarily the only scenario where this problem will occur.

STEPS:
1) Create three text files in order (test1.txt, test2.txt and test3.txt)
2) Dirty all of the editors by typing something for each of them
3) Right-click on test2.txt in the Navigator and select Properties
4) Make the file read-only by checking the Read Only flag
5) Select File->Exit (or File->Close All)
6) Select all files in Save Resources dialog
7) An error dialog appears indicating that test2.txt was read-only

Result:
All the editors are gone but only test1.txt will be saved. test2.txt and 
test3.txt will not be saved. The user can potentially lose all their work.

Expected Result:
The exit (or closing of the editors) should be prevented so that the user has 
the opportunity to correct the problem file and save all other files.
Comment 1 John Arthorne CLA 2003-03-26 10:05:14 EST
The shutdown routine is done in the UI.
Comment 2 Nick Edgar CLA 2003-03-28 11:43:51 EST
Verified that this is actually a problem in the lastest 2.1 build.  I'm not 
going to stop-ship Eclipse 2.1 because of this, but this is something that we 
should address for 2.1.1.  Tagging as 2.2 since we don't have a 2.1.1 tag yet.
Comment 3 Nick Edgar CLA 2003-05-12 23:05:17 EDT
Please investigate a fix for 2.1.1.
Comment 4 Simon Arsenault CLA 2003-05-13 14:33:39 EDT
Code fixed in EditorManager.runtimeProgMonOp code. It was ignoring a catched 
exception. Code was released in 2.1 maintenance and HEAD streams.
Comment 5 Simon Arsenault CLA 2003-05-20 14:04:38 EDT
*** Bug 37786 has been marked as a duplicate of this bug. ***