public boolean supportsMode(String mode) throws CoreException { return delegate.supportsMode(mode); }
public boolean select(Object o) { try { return ((ILaunchConfiguration) o).supportsMode(mode); } catch (Exception e) { handleException(e); return false; } } };
@Override public boolean preLaunchCheck(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor) throws CoreException { if (!saveBeforeLaunch(configuration, mode, monitor)) { return false; } if (mode.equals(ILaunchManager.RUN_MODE) && configuration.supportsMode(ILaunchManager.DEBUG_MODE)) { IBreakpoint[] breakpoints= getBreakpoints(configuration); if (breakpoints == null) { return true; } for (int i = 0; i < breakpoints.length; i++) { if (breakpoints[i].isEnabled()) { IStatusHandler prompter = DebugPlugin.getDefault().getStatusHandler(promptStatus); if (prompter != null) { boolean launchInDebugModeInstead = ((Boolean)prompter.handleStatus(switchToDebugPromptStatus, configuration)).booleanValue(); if (launchInDebugModeInstead) { return false; //kill this launch } } // if no user prompt, or user says to continue (no need to check other breakpoints) return true; } } } // no enabled breakpoints... continue launch return true; }
if (!configuration.supportsMode(mode)) { ILaunchMode launchMode = DebugPlugin.getDefault().getLaunchManager().getLaunchMode(mode); if (launchMode == null) {
try { ILaunchConfiguration config = getLaunchConfigurationManager().isSharedConfig(getSelection(context)); if(config != null && config.exists() && config.supportsMode(mode)) { IAction action = new LaunchConfigurationAction(config, mode, config.getName(), DebugUITools.getDefaultImageDescriptor(config), accelerator++); ActionContributionItem item = new ActionContributionItem(action);
if (!sel.supportsMode(mode)) { isValid = false;
if(config != null && config.exists() && config.supportsMode(fMode)) { IAction action = new LaunchConfigurationAction(config, fMode, config.getName(), DebugUITools.getDefaultImageDescriptor(config), accelerator++); ActionContributionItem item = new ActionContributionItem(action);
private void runInternal(boolean isShift) { if(LaunchingResourceManager.isContextLaunchEnabled()) { ILaunchGroup group = DebugUIPlugin.getDefault().getLaunchConfigurationManager().getLaunchGroup(getLaunchGroupId()); ContextRunner.getDefault().launch(group, isShift); return; } try { final ILaunchConfiguration configuration = getLastLaunch(); if (configuration != null) { if (configuration.supportsMode(getMode())) { DebugUITools.launch(configuration, getMode(), isShift); } else { String configName = configuration.getName(); String title = ActionMessages.RelaunchLastAction_Cannot_relaunch_1; String message = MessageFormat.format(ActionMessages.RelaunchLastAction_Cannot_relaunch___0___because_it_does_not_support__2__mode_2, new Object[] { configName, getMode() }); MessageDialog.openError(getShell(), title, message); } } else { // If the history is empty, just open the launch config dialog openLaunchConfigurationDialog(); } } catch (CoreException ce) { DebugUIPlugin.errorDialog(getShell(), ActionMessages.RelaunchLastAction_Error_relaunching_3, ActionMessages.RelaunchLastAction_Error_encountered_attempting_to_relaunch_4, ce); // } }