Close application [message #1228104] |
Mon, 06 January 2014 07:21  |
Eclipse User |
|
|
|
Hello,
I am doing an Eclipse application, and I have an issue closing my application properly.
Here is the handler I use to close my application :
public class ExitHandler {
@Execute
public void execute(IWorkbench workbench,
@Named(IServiceConstants.ACTIVE_SHELL) Shell shell){
if (MessageDialog.openConfirm(shell, "Confirmation",
"Do you want to exit?")) {
workbench.close();
}
}
}
It works just fine if the user does "File -> Exit"
But it does not work if he clicks on the "red cross" or does Alt+F4.
How can I call my handler for the two last ways ?
Thank you for your help !
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 1.07955 seconds