Bug 2714

Summary: Closing modified editor does not prompt if open in other perspective (1GIF1X0)
Product: [Eclipse Project] Platform Reporter: Nick Edgar <n.a.edgar>
Component: UIAssignee: Eduardo Pereira <eduardo_pereira>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: kai-uwe_maetzel
Version: 2.0Keywords: usability
Target Milestone: ---   
Hardware: All   
OS: Windows 2000   
Whiteboard:

Description Nick Edgar CLA 2001-10-10 22:42:02 EDT
- open 2 Resource perspectives
- create a .txt file
- open it in both perspectives
- modify and close it in one
- there is no prompt to save
- close it in the other
- it prompts

This seems reasonable on the surface, but can actually be quite confusing.

The expectation is that if I close an editor with unsaved changes, it prompts me.
People often use this as a shortcut for hitting save: they expect to get prompted.

This is especially confusing if the other perspective has its editors hidden.
If so, you don't find out about the unsaved changes until you try and exit.

While document sharing should work across perspectives, it should still prompt to save
when closing an editor with unsaved changes.
Also when closing the perspective or window containing it.

NOTES:
Comment 1 DJ Houghton CLA 2001-10-29 19:11:27 EST
PRODUCT VERSION:
129

Comment 2 Nick Edgar CLA 2002-01-27 14:49:32 EST
Should still prompt to save even if still open in other perspective.
Comment 3 Eduardo Pereira CLA 2002-02-14 15:33:27 EST
The fix is to delete the method "isSaveOnCloseNeeded()" from AbstractTextEditor.

Kai, do you see any side efect? Can we delete this method?

Comment 4 Kai-Uwe Maetzel CLA 2002-02-17 20:01:07 EST
The fix is not to delete the method but not to call it.
Comment 5 Eduardo Pereira CLA 2002-03-25 11:37:39 EST
Fixed and released.