diff options
author | Paul Pazderski | 2019-04-05 17:19:52 +0000 |
---|---|---|
committer | Paul Pazderski | 2019-07-03 08:09:41 +0000 |
commit | 7907da8e73316345d971683cc5671026c313da1e (patch) | |
tree | 74f2688810cdfda89b535978d3e431b0cd2b943d /org.eclipse.core.externaltools | |
parent | 4b951888593050d8530d446ce36cf084fa200458 (diff) | |
download | eclipse.platform.debug-7907da8e73316345d971683cc5671026c313da1e.tar.gz eclipse.platform.debug-7907da8e73316345d971683cc5671026c313da1e.tar.xz eclipse.platform.debug-7907da8e73316345d971683cc5671026c313da1e.zip |
Bug 32205 - [console] Add launch option to merge process outputI20190703-0640
Also make use of output merge option in external tool launch.
Change-Id: Ibc3cec8df076a4cea3f83e37fa2640115dd3f49b
Signed-off-by: Paul Pazderski <paul-eclipse@ppazderski.de>
Diffstat (limited to 'org.eclipse.core.externaltools')
-rw-r--r-- | org.eclipse.core.externaltools/plugin.xml | 8 | ||||
-rw-r--r-- | org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ProgramLaunchDelegate.java | 16 |
2 files changed, 19 insertions, 5 deletions
diff --git a/org.eclipse.core.externaltools/plugin.xml b/org.eclipse.core.externaltools/plugin.xml index 29142abdc..b60e930e3 100644 --- a/org.eclipse.core.externaltools/plugin.xml +++ b/org.eclipse.core.externaltools/plugin.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <?eclipse version="3.4"?> <!-- - Copyright (c) 2005, 2010 IBM Corporation and others. + Copyright (c) 2005, 2019 IBM Corporation and others. This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 @@ -22,14 +22,16 @@ delegate="org.eclipse.core.externaltools.internal.launchConfigurations.ProgramLaunchDelegate" category="org.eclipse.ui.externaltools" modes="run" - id="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType"> + id="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType" + allowOutputMerging="true"> </launchConfigurationType> <launchConfigurationType name="%Program.externalTools" delegate="org.eclipse.core.externaltools.internal.launchConfigurations.ProgramLaunchDelegate" category="org.eclipse.ui.externaltools.builder" modes="run" - id="org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType"> + id="org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType" + allowOutputMerging="true"> </launchConfigurationType> </extension> <extension diff --git a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ProgramLaunchDelegate.java b/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ProgramLaunchDelegate.java index 1abe8c1a9..b7a0e2968 100644 --- a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ProgramLaunchDelegate.java +++ b/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ProgramLaunchDelegate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2018 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -50,6 +50,17 @@ public class ProgramLaunchDelegate extends LaunchConfigurationDelegate { private static final String ATTR_LAUNCH_IN_BACKGROUND = "org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND"; //$NON-NLS-1$ /** + * Launch configuration attribute - a boolean value indicating whether a + * configuration should be launched with merged error and standard output. + * Default value is <code>false</code>. + * <p> + * This constant is defined in org.eclipse.debug.ui, but has to be copied + * here to support headless launching. + * </p> + */ + private static final String ATTR_MERGE_OUTPUT = "org.eclipse.debug.ui.ATTR_MERGE_OUTPUT"; //$NON-NLS-1$ + + /** * @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch(org.eclipse.debug.core.ILaunchConfiguration, * java.lang.String, org.eclipse.debug.core.ILaunch, * org.eclipse.core.runtime.IProgressMonitor) @@ -110,7 +121,8 @@ public class ProgramLaunchDelegate extends LaunchConfigurationDelegate { return; } - Process p = DebugPlugin.exec(cmdLine, workingDir, envp); + boolean mergeOutput = configuration.getAttribute(ATTR_MERGE_OUTPUT, false); + Process p = DebugPlugin.exec(cmdLine, workingDir, envp, mergeOutput); IProcess process = null; // add process type to process attributes |