Skip to main content



      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 11:25 Go to next message
Eclipse UserFriend
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] Wed, 24 October 2012 21:13 Go to previous message
Eclipse UserFriend
"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 Jul 02 19:37:13 EDT 2025

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

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

Back to the top