From 697ccec4bd0017586f9221ba90c3017f09804a29 Mon Sep 17 00:00:00 2001 From: Sarika Sinha Date: Thu, 2 Aug 2018 14:32:47 +0530 Subject: Bug 537525 - Follow up of Bug 312397 - Run Configuration Command Line to Clipboard Change-Id: If197112aa3f36344e0efc5d77be169ae743d9e27 --- .../launchConfigurations/LaunchConfigurationsMessages.properties | 2 +- .../internal/ui/launchConfigurations/ShowCommandLineDialog.java | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'org.eclipse.debug.ui/ui/org/eclipse') diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties index de89a84d9..2fd2bd86e 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties @@ -117,7 +117,7 @@ LaunchConfigurationsDialog_Warning_2=Warning LaunchConfigurationsDialog_Information_3=Information LaunchConfigurationDialog_ShowCommandLine=Sho&w Command Line LaunchConfigurationDialog_ShowCommandLine_Title=Command Line -LaunchConfigurationDialog_ShowCommandLine_Copy=C&opy +LaunchConfigurationDialog_ShowCommandLine_Copy=C&opy && Close LaunchConfigurationDialog_ShowCommandLine_Default=Command Line could not be retrieved. LaunchConfigurationsDialog_0=New launch configuration LaunchConfigurationsDialog_1=Delete selected launch configuration(s) 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 e333b90b6..6a4f541c4 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 @@ -23,6 +23,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.LaunchManager; import org.eclipse.debug.internal.ui.DebugUIPlugin; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.dialogs.IDialogConstants; @@ -75,6 +76,10 @@ public class ShowCommandLineDialog extends Dialog { createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); } + private LaunchManager getLaunchManager() { + return (LaunchManager) DebugPlugin.getDefault().getLaunchManager(); + } + @Override protected Control createDialogArea(Composite parent) { Composite comp = (Composite) super.createDialogArea(parent); @@ -121,6 +126,8 @@ public class ShowCommandLineDialog extends Dialog { throw new CoreException(status); } } + launch.setAttribute(DebugPlugin.ATTR_CONSOLE_ENCODING, + getLaunchManager().getEncoding(flaunchConfiguration)); } command = delegate.showCommandLine(flaunchConfiguration, fMode, launch, null); -- cgit v1.2.3