Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Open Dialog if close RCP
Open Dialog if close RCP [message #542376] Thu, 24 June 2010 16:13 Go to next message
budili Missing name is currently offline budili Missing nameFriend
Messages: 64
Registered: May 2010
Member
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 05:36 Go to previous messageGo to next message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
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 11:30 Go to previous message
budili Missing name is currently offline budili Missing nameFriend
Messages: 64
Registered: May 2010
Member

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: Sun Dec 05 21:50:04 GMT 2021

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

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

Back to the top