|Re: Open Dialog if close RCP [message #542490 is a reply to message #542376]
||Fri, 25 June 2010 05:36
| Daniel KrÃ¼gler
Registered: July 2009
On 24.06.2010 18:13, budili wrote:|
> i want open a fileDialog, if i closed the application about the X at the
> top (on the right side).
> I have a application, and if the user want close the application, i want
> pop my special dialog , who can save the data. My special dialog is a
> command (extend from AbstractHandler).
> It is possible to use my command, if the application will closed?
You should override the preShutdown method of your WorkbenchAdvisor
and should then programmatically invoke your command via the
IHandlerService - see either of
how this can be done. A return value of false will prevent the
workbench from closing. Note: You emphasize that you want to do this
(only?), if the application is closed via the special system button.
I'm not sure that you can discriminate this. The above mention method
will be called either way, e.g. also if closed via "Exit" or Alt+F4.
HTH & Greetings from Bremen,
Powered by FUDForum
. Page generated in 0.02033 seconds