close swr-rcp application without confirmation [message #1249657] |
Tue, 18 February 2014 13:43 |
Patrick L Messages: 1 Registered: February 2014 |
Junior Member |
|
|
Hello everyone,
I am currently trying to close my Eclipse swt-rcp application and discard all changes but I am not successful. I am trying to close the Application after the computer worked for some days. So I cannot let the user answer to the confirmation dialog about saving Editors. what I am trying:
Boolean toggleSave;
IWorkbench workbench = PlatformUI.getWorkbench();
if(toggleSave) {
// save all editors without confirmation
workbench.saveAllEditors(false);
workbench.getActiveWorkbenchWindow().close();
} else {
// do not save and close
}
Since it is a large Project, i cannot change the workbench and others. We are the using org.eclipse.ui.internal implementation.
I tried to mark editors as not dirty, use WorkbenchWindow, editors or pages but could not find a solution without removing the editors from workspace.
Cheers,
Patrick
|
|
|
Powered by
FUDForum. Page generated in 0.03574 seconds