aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSarika Sinha2018-07-31 04:54:34 -0400
committerSarika Sinha2018-07-31 04:54:34 -0400
commitb6969eee271609c54a23356f4cd642c3c42ca68c (patch)
tree5da77f93ea4c4b718dfdbacf5ea7290416be7d70
parent21865ed3ef58dfc479b831009f3a00fb72e25c89 (diff)
downloadeclipse.platform.debug-b6969eee271609c54a23356f4cd642c3c42ca68c.tar.gz
eclipse.platform.debug-b6969eee271609c54a23356f4cd642c3c42ca68c.tar.xz
eclipse.platform.debug-b6969eee271609c54a23356f4cd642c3c42ca68c.zip
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java3
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/ShowCommandLineDialog.java17
2 files changed, 11 insertions, 9 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
index 30764a43b..f6ced29a0 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
@@ -1553,7 +1553,8 @@ public class LaunchConfigurationTabGroupViewer {
* Dialog to Show the Command line
*/
protected void handleShowCommandLinePressed() {
- ShowCommandLineDialog dialog = new ShowCommandLineDialog(getShell(), fOriginal);
+ ShowCommandLineDialog dialog = new ShowCommandLineDialog(getShell(), getLaunchConfigurationDialog().getMode(),
+ fOriginal);
dialog.open();
}
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 f11ab8a3a..e333b90b6 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
@@ -19,7 +19,6 @@ import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchDelegate;
-import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.core.Launch;
import org.eclipse.debug.core.model.ILaunchConfigurationDelegate;
import org.eclipse.debug.core.model.ILaunchConfigurationDelegate2;
@@ -52,10 +51,12 @@ import com.ibm.icu.text.MessageFormat;
public class ShowCommandLineDialog extends Dialog {
Text fModuleArgumentsText;
ILaunchConfiguration flaunchConfiguration;
+ String fMode;
- public ShowCommandLineDialog(Shell parentShell, ILaunchConfiguration config) {
+ public ShowCommandLineDialog(Shell parentShell, String mode, ILaunchConfiguration config) {
super(parentShell);
+ fMode = mode;
setShellStyle(SWT.RESIZE | getShellStyle());
flaunchConfiguration = config;
}
@@ -97,7 +98,7 @@ public class ShowCommandLineDialog extends Dialog {
String command = ""; //$NON-NLS-1$
try {
Set<String> modes = flaunchConfiguration.getModes();
- modes.add(ILaunchManager.RUN_MODE);
+ modes.add(fMode);
ILaunchDelegate[] delegates = flaunchConfiguration.getType().getDelegates(modes);
if (delegates.length ==1) {
ILaunchConfigurationDelegate delegate = delegates[0].getDelegate();
@@ -106,22 +107,22 @@ public class ShowCommandLineDialog extends Dialog {
if (delegate instanceof ILaunchConfigurationDelegate2) {
delegate2 = (ILaunchConfigurationDelegate2) delegate;
if (delegate2 != null) {
- launch = delegate2.getLaunch(flaunchConfiguration, ILaunchManager.RUN_MODE);
+ launch = delegate2.getLaunch(flaunchConfiguration, fMode);
}
if (launch == null) {
- launch = new Launch(flaunchConfiguration, ILaunchManager.RUN_MODE, null);
+ launch = new Launch(flaunchConfiguration, fMode, null);
} else {
// ensure the launch mode is valid
- if (!ILaunchManager.RUN_MODE.equals(launch.getLaunchMode())) {
+ if (!fMode.equals(launch.getLaunchMode())) {
IStatus status = new Status(IStatus.ERROR, DebugPlugin.getUniqueIdentifier(),
DebugPlugin.ERROR, MessageFormat.format(DebugCoreMessages.LaunchConfiguration_14,
- ILaunchManager.RUN_MODE, launch.getLaunchMode()),
+ fMode, launch.getLaunchMode()),
null);
throw new CoreException(status);
}
}
}
- command = delegate.showCommandLine(flaunchConfiguration, ILaunchManager.RUN_MODE, launch,
+ command = delegate.showCommandLine(flaunchConfiguration, fMode, launch,
null);
}