|
Re: custom close dialog for an editor [message #254260 is a reply to message #253915] |
Mon, 21 June 2004 14:53 |
Eclipse User |
|
|
|
Originally posted by: nick_edgar._no.spam.please_.ca.ibm.com
Sorry, there is currently no lifecycle for allowing editors to do this, and
WorkbenchPage cannot be subclassed.
Please file an enhancement request against Platform-UI, and provide details
about your scenario.
https://bugs.eclipse.org/bugs/enter_bug.cgi
Nick
"Daniel" <danielw@dai.ed.ac.uk> wrote in message
news:cauvbt$ft4$1@eclipse.org...
>
> How can you control the close cycle for an editor?
>
> I have an editor (a text editor if that's relevant) that, due to it's
> effects on other resources, needs to confirm closure with the user even
> if it isn't dirty. I cannot work out how to interrupt and control the
> closing of the editor.
>
> TextEditor.close() doesn't seem to get called at all.
> TextEditor.dispose() is called too late in the close cycle
>
> Perhaps I need to change WorkbenchPage.closeEditor(), but I don't know
> how to subclass WorkbenchPage (i.e. where to slot the subclass in).
>
> Thanks,
> - Daniel
>
> -----------------------------------------------
> To see a World in a Grain of Sand
> And a Heaven in a Wild Flower,
> Hold Infinity in the palm of your hand
> And Eternity in an hour.
>
> Daniel Winterstein
> 2F2, 12 Lonsdale Terrace
> Edinburgh, EH3 9HN
>
|
|
|
Re: custom close dialog for an editor [message #254494 is a reply to message #253915] |
Tue, 22 June 2004 08:09 |
Eclipse User |
|
|
|
Originally posted by: naficbm.1net.gr
maybe
editor.getEditorPart.getWorkbenchWindow.addPageListener()
can help.
Daniel wrote:
>
> How can you control the close cycle for an editor?
>
> I have an editor (a text editor if that's relevant) that, due to it's
> effects on other resources, needs to confirm closure with the user even
> if it isn't dirty. I cannot work out how to interrupt and control the
> closing of the editor.
>
> TextEditor.close() doesn't seem to get called at all.
> TextEditor.dispose() is called too late in the close cycle
>
> Perhaps I need to change WorkbenchPage.closeEditor(), but I don't know
> how to subclass WorkbenchPage (i.e. where to slot the subclass in).
>
> Thanks,
> - Daniel
>
> -----------------------------------------------
> To see a World in a Grain of Sand
> And a Heaven in a Wild Flower,
> Hold Infinity in the palm of your hand
> And Eternity in an hour.
>
> Daniel Winterstein
> 2F2, 12 Lonsdale Terrace
> Edinburgh, EH3 9HN
>
|
|
|
Powered by
FUDForum. Page generated in 0.02793 seconds