Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2010-08-31 09:46:38 -0400
committerDarin Wright2010-08-31 09:46:38 -0400
commit2ae41832cadf764f2d04fe78fd39ff32e8bf3a6f (patch)
treea893a29cb925aa59bb0f4293e88814094dec7548
parent3dae6e689eff61b9d0b441c0ccd9914cf5391adb (diff)
downloadeclipse.platform.debug-2ae41832cadf764f2d04fe78fd39ff32e8bf3a6f.tar.gz
eclipse.platform.debug-2ae41832cadf764f2d04fe78fd39ff32e8bf3a6f.tar.xz
eclipse.platform.debug-2ae41832cadf764f2d04fe78fd39ff32e8bf3a6f.zip
[r361] Bug 323953 - External Tools Launch delegate no longer supports launch in background
-rw-r--r--org.eclipse.core.externaltools/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ProgramLaunchDelegate.java30
2 files changed, 21 insertions, 11 deletions
diff --git a/org.eclipse.core.externaltools/META-INF/MANIFEST.MF b/org.eclipse.core.externaltools/META-INF/MANIFEST.MF
index dea5ba111..30d373c4f 100644
--- a/org.eclipse.core.externaltools/META-INF/MANIFEST.MF
+++ b/org.eclipse.core.externaltools/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-Localization: plugin
Bundle-SymbolicName: org.eclipse.core.externaltools;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.0.1.qualifier
Bundle-Activator: org.eclipse.core.externaltools.internal.ExternalToolsCore
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.debug.core;bundle-version="[3.6.0,4.0.0)",
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 635f340fd..00d1c63f8 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, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation 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
@@ -35,6 +35,16 @@ import org.eclipse.osgi.util.NLS;
* Launch delegate for a program.
*/
public class ProgramLaunchDelegate extends LaunchConfigurationDelegate {
+
+ /**
+ * Launch configuration attribute - a boolean value indicating whether a
+ * configuration should be launched in the background. Default value is <code>true</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_LAUNCH_IN_BACKGROUND = "org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND"; //$NON-NLS-1$
/**
* @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch(org.eclipse.debug.core.ILaunchConfiguration,
@@ -129,14 +139,14 @@ public class ProgramLaunchDelegate extends LaunchConfigurationDelegate {
process.setAttribute(IProcess.ATTR_CMDLINE,
generateCommandLine(cmdLine));
-// if (launchManager.isLaunchInBackground(configuration)) {
-// // refresh resources after process finishes
-// if (launchManager.getRefreshScope(configuration) != null) {
-// BackgroundResourceRefresher refresher = new BackgroundResourceRefresher(
-// configuration, process);
-// refresher.startBackgroundRefresh();
-// }
-// } else {
+ if (configuration.getAttribute(ATTR_LAUNCH_IN_BACKGROUND, true)) {
+ // refresh resources after process finishes
+ String scope = configuration.getAttribute(RefreshUtil.ATTR_REFRESH_SCOPE, (String)null);
+ if (scope != null) {
+ BackgroundResourceRefresher refresher = new BackgroundResourceRefresher(configuration, process);
+ refresher.startBackgroundRefresh();
+ }
+ } else {
// wait for process to exit
while (!process.isTerminated()) {
try {
@@ -151,7 +161,7 @@ public class ProgramLaunchDelegate extends LaunchConfigurationDelegate {
// refresh resources
RefreshUtil.refreshResources(configuration, monitor);
-// }
+ }
}
private String generateCommandLine(String[] commandLine) {

Back to the top