Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 60528 - [EditorMgmt] isSaveOnCloseNeeded not being called
Summary: [EditorMgmt] isSaveOnCloseNeeded not being called
Status: VERIFIED DUPLICATE of bug 37221
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.1 M5   Edit
Assignee: Nick Edgar CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-30 00:31 EDT by Phil Hunt CLA
Modified: 2005-02-16 15:51 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Hunt CLA 2004-04-30 00:31:04 EDT
The method isSaveOnCloseNeeded is not being called for EditorPart or 
MultiPageEditorPart editors implementing the ISaveablePart interface.

Sample code...
    /* 
     * @see org.eclipse.ui.ISaveablePart#isSaveOnCloseNeeded()
     */
    public boolean isSaveOnCloseNeeded() {
        System.err.println("isSaveOnCloseNeeded called.");
    	return false;
    }

This is a critical issue as it is blocking the ability to implement alternative 
logic to the normal "save" dialog that is presented on closure of the editor or 
workspace.
Comment 1 Phil Hunt CLA 2004-05-04 18:57:26 EDT
This bug may be a duplicate of 37221

I note that the workaround described in 37221 is not sufficient since the intent
is to suppress the save dialog during close.
Comment 2 Michael Van Meekeren CLA 2004-05-05 08:48:49 EDT
Is this a regression since 2.1?
Comment 3 Michael Van Meekeren CLA 2004-06-24 10:03:17 EDT
Stefan please investigate what happens now and what happened in 2.1
Comment 4 Nick Edgar CLA 2005-02-07 18:46:38 EST

*** This bug has been marked as a duplicate of 37221 ***
Comment 5 Nick Edgar CLA 2005-02-07 19:14:07 EST
See also bug 76768.  It would help to have more details about your scenario.
Why is the default dialog inappropriate in your case?
Comment 6 Phil Hunt CLA 2005-02-07 19:55:01 EST
isSaveOnCloseNeeded() was originally needed to prevent an unecessary Save dialog from appearing. 
This was needed because we were dealing with two forms of "dirty".  Dirty as in the edited document 
has been changed, and "dirty" because the document is different from the server. 

I think we got around this be adjusting our model.   We implemented a special "dirty" state in a view 
that indicates the local document is different from the server - very much like what happens with CVS.

The real issue left at this point is that this part of the API seems to be unimplemented since the method 
is never called - or, well, let us just say I was never able to trigger it.  :)
Comment 7 Nick Edgar CLA 2005-02-16 15:51:20 EST
Verified as dup in I20040215-2300.