Save project before applying recipe. Try to use content from docs cache
This commit is contained in:
@@ -184,57 +184,4 @@ public class BootDebugUITools {
|
||||
job.schedule();
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
* The following constants are copied from LaunchConfigurationDelegate
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Constant to define debug.core for the status codes
|
||||
*
|
||||
* @since 3.2
|
||||
*/
|
||||
private static final String DEBUG_CORE = "org.eclipse.debug.core";
|
||||
|
||||
/**
|
||||
* Constant to define debug.ui for the status codes
|
||||
*
|
||||
* @since 3.2
|
||||
*/
|
||||
private static final String DEBUG_UI = "org.eclipse.debug.ui";
|
||||
|
||||
/**
|
||||
* Status code for which a UI prompter is registered.
|
||||
*/
|
||||
protected static final IStatus promptStatus = new Status(IStatus.INFO, DEBUG_UI, 200, "", null);
|
||||
|
||||
/**
|
||||
* Status code for which a prompter will ask the user to save any/all of the dirty editors which have only to do
|
||||
* with this launch (scoping them to the current launch/build)
|
||||
*
|
||||
* @since 3.2
|
||||
*/
|
||||
protected static final IStatus saveScopedDirtyEditors = new Status(IStatus.INFO, DEBUG_CORE, 222, "", null);
|
||||
|
||||
/**
|
||||
* Derived from {@link LaunchConfigurationDelegate}
|
||||
* @param project
|
||||
* @return true if project was saved. False if canceled
|
||||
* @throws Exception
|
||||
*/
|
||||
public static boolean promptForProjectSave(IProject project) throws Exception {
|
||||
IStatusHandler prompter = DebugPlugin.getDefault().getStatusHandler(promptStatus);
|
||||
|
||||
if(prompter != null) {
|
||||
IProject[] projects = new IProject[] {project};
|
||||
ILaunchConfiguration configuration = null;
|
||||
if(!((Boolean)prompter.handleStatus(saveScopedDirtyEditors, new Object[]{configuration, projects})).booleanValue()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user