Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Listener to Editor close, before saving changes
Listener to Editor close, before saving changes [message #895373] Thu, 12 July 2012 15:25 Go to next message
Al Missing name is currently offline Al Missing nameFriend
Messages: 4
Registered: July 2009
Junior Member
I have a multiple page editor which is a subclass of MultiPageEditorPart. When a user closes the editor, it saves any changes made to the editor before closing it. I am soliciting for an idea and/or examples on how I can get notified when the editor is getting Closed, but before the save is attempted, so I can perform some extra work when the editor is closing, but before save is done.

An IPartListener listener notifies that the part has been closed, but occurs after the save is done.

Thanks,
Al Habte.
Re: Listener to Editor close, before saving changes [message #957061 is a reply to message #895373] Thu, 25 October 2012 01:13 Go to previous message
Tony is currently offline TonyFriend
Messages: 52
Registered: July 2009
Member
"Al Mising name" <forums-noreply@xxxxxxxx> wrote in message
news:jtmq9d$gk9$1@xxxxxxxxe.org...
>I have a multiple page editor which is a subclass of MultiPageEditorPart.
>When a user closes the editor, it saves any changes made to the editor
>before closing it. I am soliciting for an idea and/or examples on how I can
>get notified when the editor is getting Closed, but before the save is
>attempted, so I can perform some extra work when the editor is closing, but
>before save is done.
>
> An IPartListener listener notifies that the part has been closed, but
> occurs after the save is done.
>
> Thanks,
> Al Habte.

You could having the MultiPageEditorPart implement the ISaveablePart2
interface to override the promptToSaveOnClose method. Within the body you
can do the work then return the appropriate value to continue with the close
event. Hope this helps.

Tony
Previous Topic:Indigo: Prespective is not changeable any more!!
Next Topic:Incorrect Intro/Welcome behavior after move to 4.2
Goto Forum:
  


Current Time: Wed Dec 17 20:07:32 GMT 2014

Powered by FUDForum. Page generated in 0.01698 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software