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

Bug 1962

Summary: Incorrect behavior with close all perspective & dirty editor (1GD0B8M)
Product: [Eclipse Project] Platform Reporter: Simon Arsenault <simon_arsenault>
Component: UIAssignee: Kevin Haaland <Kevin_Haaland>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3 Keywords: usability
Version: 2.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Simon Arsenault CLA 2001-10-10 22:23:15 EDT
Open two perspectives. In one perspective open a file and modify it.
	Switch to the other perspective. Select Perspective->Close All from
	the menu. The current perspective is closed, then you get a dialog
	box asking whether to save the modified file. If I press cancel,
	the file is not save and the perspective remains open, yet the
	other perspective is closed already.

	We should check for open dirty editors before closing any
	perspectives, so the user can hit "cancel". Or remove the
	"cancel" button.

NOTES:

DS (5/9/01 9:15:58 AM)
	In this scenario no loss of work occurs.  It is also consistent with our algorithm
	for closing windows: a dialog appears for each in turn as they are closed.

DS (5/11/01 10:11:10 AM)
	In progress.  See:
		SaveAllOperation 0.1005 [ds] 01

EJP (10/2/2001 2:22:26 PM)
	I have started fixing this but I ended up with the following problems:
		i) There are few different scenarios:
				Closing a page.
				Closing a window or closing all pages in a window.
				Closing the workbench.
		ii) Editors may or may not make sure the content is in sync when editing the 
		same input in different editors.
	
	a) When closing a single editor or a page, editors with the same input may be
	opened in another page. Whether  it should be saved depends on isSaveOnCloseNeeded().
	b) When closing a window, editors with the same input may be open in another page
	in the same window (it would be closed as well) or is a different window.
	c) When closing the workbench, editors with contents not in sync may be opened
	and the user should be told and decide what to do.
	
	We could fix a) and b) but we need API in IEditorPart to implement c).
Comment 1 DJ Houghton CLA 2001-10-29 17:42:06 EST
PRODUCT VERSION:
	0.101 (JDK)

Comment 2 Simon Arsenault CLA 2002-01-22 11:42:20 EST
Obsolete