From d16fcb8d49334d3812c042b53fb1408a6f97d265 Mon Sep 17 00:00:00 2001 From: Doug Schaefer Date: Mon, 10 Oct 2016 00:12:25 -0400 Subject: [PATCH] Changes to make the config dialog more specific to launch bar. It no longer brings up the traditional launch configuration dialog. Instead it has a new one that uses the tabs but without the other stuff. Change-Id: I89e2ac4e6a7575e0151c24632f26b5ee565a5449 --- .../META-INF/MANIFEST.MF | 2 +- bundles/org.eclipse.launchbar.core/pom.xml | 2 +- .../launchbar/core/ILaunchDescriptorType.java | 11 + .../internal/DefaultLaunchDescriptorType.java | 6 + .../controls/internal/LaunchBarControl.java | 77 +++++-- .../META-INF/MANIFEST.MF | 2 +- bundles/org.eclipse.launchbar.ui/pom.xml | 2 +- .../ui/ILaunchBarLaunchConfigDialog.java | 29 +++ .../internal/LaunchBarLaunchConfigDialog.java | 213 ++++++++++++++++++ .../ui/internal/LaunchBarUIManager.java | 67 ++++-- 10 files changed, 367 insertions(+), 44 deletions(-) create mode 100644 bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/ILaunchBarLaunchConfigDialog.java create mode 100644 bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/LaunchBarLaunchConfigDialog.java diff --git a/bundles/org.eclipse.launchbar.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.launchbar.core/META-INF/MANIFEST.MF index 5fb04cf0628..6114714257c 100644 --- a/bundles/org.eclipse.launchbar.core/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.launchbar.core/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: LaunchBar Core Bundle-SymbolicName: org.eclipse.launchbar.core;singleton:=true -Bundle-Version: 2.0.1.qualifier +Bundle-Version: 2.1.0.qualifier Bundle-Activator: org.eclipse.launchbar.core.internal.Activator Bundle-Vendor: Eclipse CDT Require-Bundle: org.eclipse.core.runtime, diff --git a/bundles/org.eclipse.launchbar.core/pom.xml b/bundles/org.eclipse.launchbar.core/pom.xml index 54292889cf8..66f9d66550d 100644 --- a/bundles/org.eclipse.launchbar.core/pom.xml +++ b/bundles/org.eclipse.launchbar.core/pom.xml @@ -12,7 +12,7 @@ org.eclipse.launchbar.core - 2.0.1-SNAPSHOT + 2.1.0-SNAPSHOT eclipse-plugin diff --git a/bundles/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/ILaunchDescriptorType.java b/bundles/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/ILaunchDescriptorType.java index 6452c7d2efe..6710ee4a7e8 100644 --- a/bundles/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/ILaunchDescriptorType.java +++ b/bundles/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/ILaunchDescriptorType.java @@ -33,4 +33,15 @@ public interface ILaunchDescriptorType { */ ILaunchDescriptor getDescriptor(Object launchObject) throws CoreException; + /** + * Does this descriptor type support launching on targets other than Local? + * + * @return supports targets + * @throws CoreException + * @since 2.1 + */ + default boolean supportsTargets() throws CoreException { + return true; + } + } diff --git a/bundles/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/DefaultLaunchDescriptorType.java b/bundles/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/DefaultLaunchDescriptorType.java index 840c0fda82d..d1297d6fdd6 100644 --- a/bundles/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/DefaultLaunchDescriptorType.java +++ b/bundles/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/DefaultLaunchDescriptorType.java @@ -30,6 +30,12 @@ public class DefaultLaunchDescriptorType implements ILaunchDescriptorType { private Map descriptors = new HashMap<>(); + @Override + public boolean supportsTargets() throws CoreException { + // Old style launch configs do not support targets. + return false; + } + @Override public ILaunchDescriptor getDescriptor(Object launchObject) { if (launchObject instanceof ILaunchConfiguration) { diff --git a/bundles/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/LaunchBarControl.java b/bundles/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/LaunchBarControl.java index 80668df5945..d89987ccee7 100644 --- a/bundles/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/LaunchBarControl.java +++ b/bundles/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/LaunchBarControl.java @@ -50,8 +50,10 @@ public class LaunchBarControl implements ILaunchBarListener { private ILaunchBarManager manager = Activator.getService(ILaunchBarManager.class); + private Composite container; private ConfigSelector configSelector; private ModeSelector modeSelector; + private Label onLabel; private TargetSelector targetSelector; private static final int SELECTION_DELAY = 200; @@ -60,7 +62,7 @@ public class LaunchBarControl implements ILaunchBarListener { public void createControl(Composite parent) { manager.addListener(this); - Composite container = new Composite(parent, SWT.NONE); + container = new Composite(parent, SWT.NONE); container.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false)); GridLayout layout = new GridLayout(5, false); layout.marginHeight = 2; @@ -94,20 +96,34 @@ public class LaunchBarControl implements ILaunchBarListener { configSelector.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false)); configSelector.setInput(manager); + // TODO remove boolean enabled = store.getBoolean(Activator.PREF_ENABLE_TARGETSELECTOR); - if (enabled) { - Label label = new Label(container, SWT.NONE); - label.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false)); - label.setText(Messages.LaunchBarControl_0 + ":"); //$NON-NLS-1$ - targetSelector = new TargetSelector(container, SWT.NONE); - targetSelector.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false)); - targetSelector.setInput(manager); + boolean supportsTargets = true; + try { + ILaunchDescriptor desc = manager.getActiveLaunchDescriptor(); + supportsTargets = desc.getType().supportsTargets(); + } catch (CoreException e) { + Activator.log(e); + } + + if (supportsTargets) { + createTargetSelector(); } syncSelectors(); } + private void createTargetSelector() { + onLabel = new Label(container, SWT.NONE); + onLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false)); + onLabel.setText(Messages.LaunchBarControl_0 + ":"); //$NON-NLS-1$ + + targetSelector = new TargetSelector(container, SWT.NONE); + targetSelector.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false)); + targetSelector.setInput(manager); + } + protected void syncSelectors() { try { if (configSelector != null) @@ -145,13 +161,13 @@ public class LaunchBarControl implements ILaunchBarListener { final Event trigger = new Event(); final IHandlerService handlerService = PlatformUI.getWorkbench().getService(IHandlerService.class); ExecutionEvent executionEvent = handlerService.createExecutionEvent(command, trigger); - try { - command.executeWithChecks(executionEvent); - } catch (OperationCanceledException ex) { - // abort - } catch (Exception ex) { - Activator.log(ex); - } + try { + command.executeWithChecks(executionEvent); + } catch (OperationCanceledException ex) { + // abort + } catch (Exception ex) { + Activator.log(ex); + } }; }); button.addDisposeListener(new DisposeListener() { @@ -165,9 +181,32 @@ public class LaunchBarControl implements ILaunchBarListener { @Override public void activeLaunchDescriptorChanged(ILaunchDescriptor descriptor) { - if (configSelector != null) { - configSelector.setDelayedSelection(descriptor, SELECTION_DELAY); - } + container.getDisplay().syncExec(() -> { + if (configSelector != null) { + configSelector.setDelayedSelection(descriptor, SELECTION_DELAY); + } + + boolean supportsTargets = true; + try { + supportsTargets = descriptor.getType().supportsTargets(); + } catch (CoreException e) { + Activator.log(e); + } + + if (supportsTargets) { + if (targetSelector == null || targetSelector.isDisposed()) { + createTargetSelector(); + syncSelectors(); + container.getParent().layout(true); + } + } else { + if (targetSelector != null && !targetSelector.isDisposed()) { + onLabel.dispose(); + targetSelector.dispose(); + container.getParent().layout(true); + } + } + }); } @Override @@ -194,5 +233,5 @@ public class LaunchBarControl implements ILaunchBarListener { public ConfigSelector getConfigSelector() { return configSelector; } - + } diff --git a/bundles/org.eclipse.launchbar.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.launchbar.ui/META-INF/MANIFEST.MF index 7f4b7eb81aa..3ad1121a898 100644 --- a/bundles/org.eclipse.launchbar.ui/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.launchbar.ui/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: LaunchBar UI Bundle-SymbolicName: org.eclipse.launchbar.ui;singleton:=true -Bundle-Version: 2.0.1.qualifier +Bundle-Version: 2.1.0.qualifier Bundle-Activator: org.eclipse.launchbar.ui.internal.Activator Bundle-Vendor: Eclipse CDT Require-Bundle: org.eclipse.core.runtime, diff --git a/bundles/org.eclipse.launchbar.ui/pom.xml b/bundles/org.eclipse.launchbar.ui/pom.xml index 919f0336c11..0fe05f35edb 100644 --- a/bundles/org.eclipse.launchbar.ui/pom.xml +++ b/bundles/org.eclipse.launchbar.ui/pom.xml @@ -12,7 +12,7 @@ org.eclipse.launchbar.ui - 2.0.1-SNAPSHOT + 2.1.0-SNAPSHOT eclipse-plugin diff --git a/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/ILaunchBarLaunchConfigDialog.java b/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/ILaunchBarLaunchConfigDialog.java new file mode 100644 index 00000000000..b7e59c5d442 --- /dev/null +++ b/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/ILaunchBarLaunchConfigDialog.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright (c) 2016 QNX Software Systems and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.eclipse.launchbar.ui; + +import org.eclipse.debug.ui.ILaunchConfigurationDialog; +import org.eclipse.launchbar.core.target.ILaunchTarget; + +/** + * The edit dialog for launch configurations created by the launch bar. Allows tabs to get the + * target associated with the edit session. + * + * @since 2.1 + */ +public interface ILaunchBarLaunchConfigDialog extends ILaunchConfigurationDialog { + + /** + * The target associated with the edit session, usually the active target when the session was + * started. + * + * @return launch target + */ + ILaunchTarget getLaunchTarget(); + +} diff --git a/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/LaunchBarLaunchConfigDialog.java b/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/LaunchBarLaunchConfigDialog.java new file mode 100644 index 00000000000..b5a677a49b8 --- /dev/null +++ b/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/LaunchBarLaunchConfigDialog.java @@ -0,0 +1,213 @@ +package org.eclipse.launchbar.ui.internal; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; +import org.eclipse.debug.core.ILaunchMode; +import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationPresentationManager; +import org.eclipse.debug.ui.ILaunchConfigurationTab; +import org.eclipse.debug.ui.ILaunchConfigurationTabGroup; +import org.eclipse.jface.dialogs.TitleAreaDialog; +import org.eclipse.jface.operation.IRunnableWithProgress; +import org.eclipse.launchbar.core.ILaunchDescriptor; +import org.eclipse.launchbar.core.target.ILaunchTarget; +import org.eclipse.launchbar.ui.ILaunchBarLaunchConfigDialog; +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.CTabFolder; +import org.eclipse.swt.custom.CTabItem; +import org.eclipse.swt.events.FocusAdapter; +import org.eclipse.swt.events.FocusEvent; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Shell; + +public class LaunchBarLaunchConfigDialog extends TitleAreaDialog implements ILaunchBarLaunchConfigDialog { + + private final ILaunchConfigurationWorkingCopy workingCopy; + private final ILaunchDescriptor descriptor; + private final ILaunchMode mode; + private final ILaunchTarget target; + + private ILaunchConfigurationTabGroup group; + private CTabFolder tabFolder; + private CTabItem lastSelection; + + public LaunchBarLaunchConfigDialog(Shell shell, ILaunchConfigurationWorkingCopy workingCopy, + ILaunchDescriptor descriptor, ILaunchMode mode, ILaunchTarget target) { + super(shell); + this.workingCopy = workingCopy; + this.descriptor = descriptor; + this.mode = mode; + this.target = target; + setShellStyle(getShellStyle() | SWT.RESIZE); + } + + @Override + protected int getDialogBoundsStrategy() { + // Don't persist the size since it'll be different for every config + return DIALOG_PERSISTLOCATION; + } + + @Override + protected Control createDialogArea(Composite parent) { + // create the top level composite for the dialog area + Composite composite = new Composite(parent, SWT.NONE); + GridLayout layout = new GridLayout(); + layout.verticalSpacing = 0; + composite.setLayout(layout); + composite.setLayoutData(new GridData(GridData.FILL_BOTH)); + composite.setFont(parent.getFont()); + + getShell().setText("Edit Configuration"); + boolean supportsTargets = true; + try { + supportsTargets = descriptor.getType().supportsTargets(); + } catch (CoreException e) { + Activator.log(e); + } + if (supportsTargets) { + setTitle(String.format("Edit %s for %s on %s", descriptor.getName(), mode.getLabel(), target.getId())); + } else { + setTitle(String.format("Edit %s for %s", descriptor.getName(), mode.getLabel())); + } + setMessage("Set parameters for the configuration."); + + tabFolder = new CTabFolder(composite, SWT.NONE); + tabFolder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + tabFolder.addFocusListener(new FocusAdapter() { + @Override + public void focusGained(FocusEvent e) { + CTabItem selItem = tabFolder.getSelection(); + if (selItem != null) { + selItem.getControl().setFocus(); + } + } + }); + tabFolder.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + ILaunchConfigurationTab oldTab = (ILaunchConfigurationTab) lastSelection.getData(); + oldTab.deactivated(workingCopy); + + CTabItem selItem = tabFolder.getSelection(); + ILaunchConfigurationTab newTab = (ILaunchConfigurationTab) selItem.getData(); + newTab.activated(workingCopy); + + selItem.getControl().setFocus(); + } + }); + + try { + group = LaunchConfigurationPresentationManager.getDefault().getTabGroup(workingCopy, mode.getIdentifier()); + group.createTabs(this, mode.getIdentifier()); + + for (ILaunchConfigurationTab configTab : group.getTabs()) { + configTab.setLaunchConfigurationDialog(this); + + CTabItem tabItem = new CTabItem(tabFolder, SWT.NONE); + tabItem.setData(configTab); + tabItem.setText(configTab.getName()); + + Composite tabComp = new Composite(tabFolder, SWT.NONE); + tabComp.setLayout(new GridLayout()); + tabItem.setControl(tabComp); + + configTab.createControl(tabComp); + Control configControl = configTab.getControl(); + configControl.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + + if (lastSelection == null) { + // Assuming the first one ends up selected + lastSelection = tabItem; + } + } + + group.initializeFrom(workingCopy); + } catch (CoreException e) { + Activator.log(e.getStatus()); + } + + return composite; + } + + @Override + protected void okPressed() { + group.performApply(workingCopy); + super.okPressed(); + } + + @Override + public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable) + throws InvocationTargetException, InterruptedException { + // TODO Auto-generated method stub + + } + + @Override + public void updateButtons() { + // TODO + } + + @Override + public void updateMessage() { + // TODO Auto-generated method stub + + } + + @Override + public void setName(String name) { + // Names aren't setable from this dialog + } + + @Override + public String generateName(String name) { + // Names aren't setable from this dialog + return null; + } + + @Override + public ILaunchConfigurationTab[] getTabs() { + return group.getTabs(); + } + + @Override + public ILaunchConfigurationTab getActiveTab() { + CTabItem selItem = tabFolder.getSelection(); + if (selItem != null) { + return (ILaunchConfigurationTab) selItem.getData(); + } else { + return null; + } + } + + @Override + public String getMode() { + return mode.getIdentifier(); + } + + @Override + public ILaunchTarget getLaunchTarget() { + return target; + } + + @Override + public void setActiveTab(ILaunchConfigurationTab tab) { + for (CTabItem item : tabFolder.getItems()) { + if (tab.equals(item.getData())) { + tabFolder.setSelection(item); + return; + } + } + } + + @Override + public void setActiveTab(int index) { + tabFolder.setSelection(index); + } + +} diff --git a/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/LaunchBarUIManager.java b/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/LaunchBarUIManager.java index 907ad6234b3..c7e3a2cd1a9 100644 --- a/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/LaunchBarUIManager.java +++ b/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/LaunchBarUIManager.java @@ -32,6 +32,7 @@ import org.eclipse.debug.ui.ILaunchGroup; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.jface.window.Window; import org.eclipse.launchbar.core.ILaunchBarManager; import org.eclipse.launchbar.core.ILaunchDescriptor; import org.eclipse.launchbar.core.internal.ExecutableExtension; @@ -48,14 +49,16 @@ public class LaunchBarUIManager implements ILaunchBarUIManager { private void init() { if (descriptorLabelProviders == null) { descriptorLabelProviders = new HashMap<>(); - IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(Activator.PLUGIN_ID, "launchBarUIContributions"); //$NON-NLS-1$ + IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(Activator.PLUGIN_ID, + "launchBarUIContributions"); //$NON-NLS-1$ IExtension[] extensions = point.getExtensions(); for (IExtension extension : extensions) { for (IConfigurationElement element : extension.getConfigurationElements()) { String elementName = element.getName(); if (elementName.equals("descriptorUI")) { //$NON-NLS-1$ String descriptorTypeId = element.getAttribute("descriptorTypeId"); //$NON-NLS-1$ - ExecutableExtension labelProvider = new ExecutableExtension<>(element, "labelProvider"); //$NON-NLS-1$ + ExecutableExtension labelProvider = new ExecutableExtension<>(element, + "labelProvider"); //$NON-NLS-1$ descriptorLabelProviders.put(descriptorTypeId, labelProvider); } } @@ -66,7 +69,8 @@ public class LaunchBarUIManager implements ILaunchBarUIManager { @Override public ILabelProvider getLabelProvider(ILaunchDescriptor descriptor) throws CoreException { init(); - ExecutableExtension provider = descriptorLabelProviders.get(manager.getDescriptorTypeId(descriptor.getType())); + ExecutableExtension provider = descriptorLabelProviders + .get(manager.getDescriptorTypeId(descriptor.getType())); return provider != null ? provider.get() : null; } @@ -84,26 +88,47 @@ public class LaunchBarUIManager implements ILaunchBarUIManager { return s; } - // At this point, no error handling should be needed. - try { - ILaunchBarManager manager = Activator.getService(ILaunchBarManager.class); - ILaunchMode mode = manager.getActiveLaunchMode(); - ILaunchTarget target = manager.getActiveLaunchTarget(); - ILaunchConfigurationType configType = manager.getLaunchConfigurationType(descriptor, target); - ILaunchGroup group = DebugUIPlugin.getDefault().getLaunchConfigurationManager().getLaunchGroup(configType, - mode.getIdentifier()); - ILaunchConfiguration config = manager.getLaunchConfiguration(descriptor, target); - if (config instanceof ILaunchConfigurationWorkingCopy - && ((ILaunchConfigurationWorkingCopy) config).isDirty()) { - config = ((ILaunchConfigurationWorkingCopy) config).doSave(); + if (true) { + try { + ILaunchMode mode = manager.getActiveLaunchMode(); + ILaunchTarget target = manager.getActiveLaunchTarget(); + ILaunchConfiguration config = manager.getLaunchConfiguration(descriptor, target); + + ILaunchConfigurationWorkingCopy workingCopy = config.getWorkingCopy(); + LaunchBarLaunchConfigDialog dialog = new LaunchBarLaunchConfigDialog(shell, workingCopy, descriptor, + mode, target); + if (dialog.open() == Window.OK) { + if (!workingCopy.getOriginal().equals(workingCopy) + && !workingCopy.getOriginal().getAttributes().equals(workingCopy.getAttributes())) { + workingCopy.doSave(); + } + } + } catch (CoreException e) { + return e.getStatus(); + } + } else { + // At this point, no error handling should be needed. + try { + ILaunchBarManager manager = Activator.getService(ILaunchBarManager.class); + ILaunchMode mode = manager.getActiveLaunchMode(); + ILaunchTarget target = manager.getActiveLaunchTarget(); + ILaunchConfigurationType configType = manager.getLaunchConfigurationType(descriptor, target); + ILaunchGroup group = DebugUIPlugin.getDefault().getLaunchConfigurationManager().getLaunchGroup( + configType, + mode.getIdentifier()); + ILaunchConfiguration config = manager.getLaunchConfiguration(descriptor, target); + if (config instanceof ILaunchConfigurationWorkingCopy + && ((ILaunchConfigurationWorkingCopy) config).isDirty()) { + config = ((ILaunchConfigurationWorkingCopy) config).doSave(); + } + // open real eclipse launch configurations dialog + DebugUIPlugin.openLaunchConfigurationsDialog(shell, new StructuredSelection(config), + group.getIdentifier(), false); + } catch (CoreException e2) { + return e2.getStatus(); } - // open real eclipse launch configurations dialog - DebugUIPlugin.openLaunchConfigurationsDialog(shell, new StructuredSelection(config), - group.getIdentifier(), false); - return Status.OK_STATUS; - } catch (CoreException e2) { - return e2.getStatus(); } + return Status.OK_STATUS; } private IStatus canOpenConfigurationEditor(ILaunchDescriptor desc) {