eclipse plugin: Save the workspace before exiting.

This gets rid of some annoying warning messages
This commit is contained in:
Timotei Dolean 2011-06-24 15:17:24 +00:00
parent f9f8a72f83
commit e198baae4c

View file

@ -8,10 +8,14 @@
*******************************************************************************/
package org.wesnoth.product;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.ui.application.ActionBarAdvisor;
import org.eclipse.ui.application.IActionBarConfigurer;
import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
import org.eclipse.ui.application.WorkbenchWindowAdvisor;
import org.wesnoth.Logger;
public class WesnothWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
@ -39,7 +43,18 @@ public class WesnothWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
@Override
public void postWindowCreate()
{
super.postWindowCreate();
this.getWindowConfigurer().getWindow().getActivePage().hideActionSet("org.eclipse.ui.run"); //$NON-NLS-1$
getWindowConfigurer().getWindow().getActivePage().hideActionSet("org.eclipse.ui.run"); //$NON-NLS-1$
}
@Override
public boolean preWindowShellClose()
{
try {
ResourcesPlugin.getWorkspace( ).save( true , new NullProgressMonitor() );
}
catch ( CoreException e ) {
Logger.getInstance( ).logException( e );
}
return true;
}
}