Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » close swr-rcp application without confirmation
close swr-rcp application without confirmation [message #1249657] Tue, 18 February 2014 08:43
Patrick L is currently offline 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
Previous Topic:Programmatically trim a toolbar 3.x
Next Topic:On the use of Workspace and WorkManager API
Goto Forum:
  


Current Time: Tue Jul 29 19:01:00 EDT 2014

Powered by FUDForum. Page generated in 0.01463 seconds