Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Open Dialog if close RCP
Open Dialog if close RCP [message #542376] Thu, 24 June 2010 12:13 Go to next message
Eclipse UserFriend
Hallo,

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?

I have try to open my FileDialog in the "stop" method in the calss "Activator", but this doesnt work.

Can someone helpt me ??

Thx.
Re: Open Dialog if close RCP [message #542490 is a reply to message #542376] Fri, 25 June 2010 01:36 Go to previous messageGo to next message
Eclipse UserFriend
On 24.06.2010 18:13, budili wrote:
> Hallo,
>
> 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

http://wiki.eclipse.org/Platform_Command_Framework
http://blog.eclipse-tips.com/2009/01/commands-part-4-misc-it ems.html
http://www.vogella.de/articles/EclipseRCP/article.html

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,

Daniel Krügler
icon14.gif  Re: Open Dialog if close RCP [message #542581 is a reply to message #542490] Fri, 25 June 2010 07:30 Go to previous message
Eclipse UserFriend

Thank u very much,
exactly this method i have searched.
Previous Topic:Wrapping text in the table
Next Topic:Different height in different table rows
Goto Forum:
  


Current Time: Mon Jul 07 18:54:55 EDT 2025

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

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

Back to the top