[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.platform] Re: How to prevent shutdown
|
It is easy enough to detect the shutdown in a standard plug-in, using:
org.eclipse.ui.PlatformUI.getWorkbench().isClosing();
(or by listening to the workbench for life cycle events)
I do not know if you can abort the shutdown, but you should be able to
put up a dialog and accomplish the "do you want to save?" step prior to
shutdown.
Dirk Wenke wrote:
Hi,
How can I prevent eclipse from shutting down?
I want to implement a feature where the user is requested whether he/she
wants to save all unsaved data, after clicking on the exit button. And
it should also be possible to cancel the shutdown process.
I know that this can be implemented by a WorkbenchAdvisor and the
preShutdown() method. But I don't have a Rich Client Application, I just
have a small plugin that can be integrated in a simple eclipse
installation. And the shutdown() method of my plugin will not work,
because I cannot prevent eclipse from closing.
Is there a way to do this?
Best,
Dirk