public void run() { DebugUITools.openLaunchConfigurationDialog(getShell(), configuration, groupId, null); } }
/** * Delegate method to launch the specified <code>ILaunchConfiguration</code> in the specified mode * * @param mode * the mode to launch in * @param configuration * the <code>ILaunchConfiguration</code> to launch */ private void launch(String mode, ILaunchConfiguration configuration) { if (fShowDialog) { /* * // Offer to save dirty editors before opening the dialog as the contents // of an Ant editor often affect the contents of the dialog. * if (!DebugUITools.saveBeforeLaunch()) { return; } */ IStatus status = new Status(IStatus.INFO, IAntUIConstants.PLUGIN_ID, IAntUIConstants.STATUS_INIT_RUN_ANT, IAntCoreConstants.EMPTY_STRING, null); String groupId; if (mode.equals(ILaunchManager.DEBUG_MODE)) { groupId = IDebugUIConstants.ID_DEBUG_LAUNCH_GROUP; } else { groupId = org.eclipse.ui.externaltools.internal.model.IExternalToolConstants.ID_EXTERNAL_TOOLS_LAUNCH_GROUP; } DebugUITools.openLaunchConfigurationDialog(AntUIPlugin.getActiveWorkbenchWindow().getShell(), configuration, groupId, status); } else { DebugUITools.launch(configuration, mode); } }
/** * @see org.eclipse.debug.core.IStatusHandler#handleStatus(org.eclipse.core.runtime.IStatus, java.lang.Object) */ @Override public Object handleStatus(IStatus status, Object source) throws CoreException { if(source instanceof Object[]) { Object[] infos = (Object[]) source; if(infos.length == 2) { final ILaunchConfiguration config = (ILaunchConfiguration) infos[0]; final String mode = (String) infos[1]; final Shell shell = DebugUIPlugin.getShell(); Runnable runnable = () -> { ILaunchGroup group = DebugUITools.getLaunchGroup(config, mode); if (group != null) { DebugUITools.openLaunchConfigurationDialog(shell, config, group.getIdentifier(), null); } }; DebugUIPlugin.getStandardDisplay().asyncExec(runnable); } } return Status.OK_STATUS; } }
public void run() { DebugPlugin.getDefault().getLaunchManager().addLaunchListener(new SPLaunchListener(config)); if (identifier.getType() == ProcIdentifier.TYPE_TRIGGER) { ILaunchGroup group = DebugUITools.getLaunchGroup(config, spmode); String groupId = group == null ? "" : group.getIdentifier(); //$NON-NLS-1$ DebugUITools.openLaunchConfigurationDialog(getShell(), config, groupId, null); return; } DebugUITools.launch(config, spmode); } });
/** * @see org.eclipse.jface.action.IAction#run() */ @Override public void run() { ILaunchGroup group = DebugUITools.getLaunchGroup(getLaunchConfiguration(), getMode()); if (group != null) { if(isTerminated()) { DebugUITools.openLaunchConfigurationDialog( DebugUIPlugin.getShell(), getLaunchConfiguration(), group.getIdentifier(), null); } else { DebugUIPlugin.openLaunchConfigurationEditDialog( DebugUIPlugin.getShell(), getLaunchConfiguration(), group.getIdentifier(), null, false); } } }