Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsListener to Editor close, before saving changes
https://www.eclipse.org/forums/index.php/mv/msg/367411/895373/#msg_895373
An IPartListener listener notifies that the part has been closed, but occurs after the save is done.
Thanks,
Al Habte.]]>Al Missing name2012-07-12T15:25:32-00:00Re: Listener to Editor close, before saving changes
https://www.eclipse.org/forums/index.php/mv/msg/367411/957061/#msg_957061
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.