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

Bug 111495

Summary: [EditorMgmt] Override confirmation dialog message at closing editor
Product: [Eclipse Project] Platform Reporter: Tami Takamiya <ttakamiy>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: RESOLVED WORKSFORME QA Contact: Remy Suen <remy.suen>
Severity: enhancement    
Priority: P3 Keywords: helpwanted
Version: 3.0.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Tami Takamiya CLA 2005-10-04 14:23:36 EDT
When an Editor part is closed and its isDirty method returns true, Eclipse
displays the confirmation message "'xxxxxx' has been modified.  Save changes?".
 We would like to have a feature to override the message.  

Our editor is not a regular "editor".  It represents a connection with a server.
 It does a kind of edit operations also, but we would like to display a message
like "Do you really want to close the server connection?" in place of the
current default message.
Comment 1 Douglas Pollock CLA 2005-10-04 16:25:52 EDT
I can't think of a way in which this would work.  If multiple dirty editors 
are open, then what do we do? 
 
If we do do this, I think we'd need to provide some kind of 
EditorPart.getSaveMessage or EditorPart.getSaveDialog. 
 
Comment 2 Michael Van Meekeren CLA 2006-04-21 13:19:25 EDT
Moving Dougs bugs
Comment 3 Susan McCourt CLA 2009-07-09 19:08:13 EDT
As per http://wiki.eclipse.org/Platform_UI/Bug_Triage_Change_2009
Comment 4 Boris Bokowski CLA 2009-11-17 13:05:24 EST
Remy is now responsible for watching the [EditorMgmt] component area.
Comment 5 Remy Suen CLA 2009-11-17 14:40:17 EST
Tami, does implementing ISaveablePart2 help solve your problem?
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/ui/ISaveablePart2.html
Comment 6 Tami Takamiya CLA 2009-11-23 09:15:11 EST
> Tami, does implementing ISaveablePart2 help solve your problem?

Yes, I think so.

Tami
Comment 7 Remy Suen CLA 2009-11-23 09:31:03 EST
(In reply to comment #6)
> > Tami, does implementing ISaveablePart2 help solve your problem?
> 
> Yes, I think so.

Great, thanks for letting us know. If it proves to be insufficient, please feel free to reopen the bug with your reasoning.