Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/ShowCommandLineDialog.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/ShowCommandLineDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/ShowCommandLineDialog.java
index 8e52c8d63..a5c1c0772 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/ShowCommandLineDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/ShowCommandLineDialog.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2018 IBM Corporation and others.
+ * Copyright (c) 2018, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -27,6 +27,7 @@ import org.eclipse.debug.core.Launch;
import org.eclipse.debug.core.model.ILaunchConfigurationDelegate;
import org.eclipse.debug.core.model.ILaunchConfigurationDelegate2;
import org.eclipse.debug.internal.core.DebugCoreMessages;
+import org.eclipse.debug.internal.core.LaunchConfiguration;
import org.eclipse.debug.internal.core.LaunchManager;
import org.eclipse.debug.internal.ui.DebugUIPlugin;
import org.eclipse.jface.dialogs.Dialog;
@@ -108,8 +109,15 @@ public class ShowCommandLineDialog extends Dialog {
Set<String> modes = flaunchConfiguration.getModes();
modes.add(fMode);
ILaunchDelegate[] delegates = flaunchConfiguration.getType().getDelegates(modes);
- if (delegates.length ==1) {
- ILaunchConfigurationDelegate delegate = delegates[0].getDelegate();
+ ILaunchConfigurationDelegate delegate = null;
+ if (delegates.length == 1) {
+ delegate = delegates[0].getDelegate();
+ } else {
+ if (flaunchConfiguration instanceof LaunchConfiguration) {
+ delegate = ((LaunchConfiguration) flaunchConfiguration).getPreferredLaunchDelegate(fMode);
+ }
+ }
+ if (delegate != null) {
ILaunchConfigurationDelegate2 delegate2;
ILaunch launch = null;
if (delegate instanceof ILaunchConfigurationDelegate2) {

Back to the top