Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 24496 - [Workbench] WorkbenchPage not checking editor.isSaveOnCloseNeeded()
Summary: [Workbench] WorkbenchPage not checking editor.isSaveOnCloseNeeded()
Status: CLOSED INVALID
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Eduardo Pereira CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-10-08 08:50 EDT by Kit Lo CLA
Modified: 2006-11-16 11:39 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kit Lo CLA 2002-10-08 08:50:27 EDT
Our editor synchronizes the contents if the same resource is edited in two (or 
more) different windows. We keep a reference count, and only prompt to save the 
resource when the last editor is closed.

This logic is broken in Eclipse V2 because the "editor.isSaveOnCloseNeeded()" 
check is removed from org.eclipse.ui.internal.WorkbenchPage.closeEditor
(IEditorPart editor, boolean save).

In V1.0.2 it used to have:
	// Save part.
	if (save && editor.isSaveOnCloseNeeded() 
		&& !getEditorManager().saveEditor(editor, true))
		return false;

Now in V2 it's changed to:
	// Save part.
	if (save && !getEditorManager().saveEditor(editor, true))
		return false;

We want to understand the reason for the change. Also, please suggest a 
workaround for this problem. Thanks.
Comment 1 Eduardo Pereira CLA 2002-10-08 10:22:45 EDT
Scenario: 2+ editors in different windows editing the same thing.
* In V1 the workbench would prompt to save an editor only when the last editor 
was closed.
* In V2 the behavior was changed and now it prompts the user for every dirty 
editor.

This is not a problem and you do not have to workaround. That is the new 
intended workbench bahaviour.
Comment 2 Eduardo Pereira CLA 2002-10-16 12:08:35 EDT
Please reopen if you still think this is a problem.
Comment 3 Kit Lo CLA 2006-11-16 11:39:08 EST
closing invalid bug