Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJared Burns2003-08-29 23:38:46 +0000
committerJared Burns2003-08-29 23:38:46 +0000
commitcd6ae0dbe1d0e97b32f193bf1160c007ab1ca7b7 (patch)
tree2397e2df0c792336383fcb63fd26993ef6c3e27d /org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java
parentb9696a631e5c89c4ba2aa6cd86ec9ad5522844eb (diff)
downloadeclipse.platform.debug-cd6ae0dbe1d0e97b32f193bf1160c007ab1ca7b7.tar.gz
eclipse.platform.debug-cd6ae0dbe1d0e97b32f193bf1160c007ab1ca7b7.tar.xz
eclipse.platform.debug-cd6ae0dbe1d0e97b32f193bf1160c007ab1ca7b7.zip
Bug 42020 - Move "Run in background" to builders only
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java48
1 files changed, 48 insertions, 0 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java
index 9a045e8df..8f994b9d6 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java
@@ -79,6 +79,8 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
private Text fSharedLocationText;
private Button fSharedLocationButton;
+ protected Button fRunInBackgroundButton;
+
/**
* Check box list for specifying favorites
*/
@@ -199,6 +201,29 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
updateLaunchConfigurationDialog();
}
});
+
+ createVerticalSpacer(comp, 1);
+ createRunInBackgroundComponent(comp);
+ }
+
+ /**
+ * Creates the controls needed to edit the run in background
+ * attribute of an external tool
+ *
+ * @param parent the composite to create the controls in
+ */
+ protected void createRunInBackgroundComponent(Composite parent) {
+ fRunInBackgroundButton = new Button(parent, SWT.CHECK);
+ fRunInBackgroundButton.setText("Run in bac&kground");
+ GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
+ data.horizontalSpan = 2;
+ fRunInBackgroundButton.setLayoutData(data);
+ fRunInBackgroundButton.setFont(parent.getFont());
+ fRunInBackgroundButton.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ updateLaunchConfigurationDialog();
+ }
+ });
}
@@ -300,6 +325,27 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
updateLocalSharedFromConfig(configuration);
updateSharedLocationFromConfig(configuration);
updateFavoritesFromConfig(configuration);
+ updateRunInBackground(configuration);
+ }
+
+ protected void updateRunInBackground(ILaunchConfiguration configuration) {
+ fRunInBackgroundButton.setSelection(isRunInBackground(configuration));
+ }
+
+ /**
+ * Returns whether the given configuration should be run in the background.
+ *
+ * @param configuration the configuration
+ * @return whether the configuration is configured to run in the background
+ */
+ public static boolean isRunInBackground(ILaunchConfiguration configuration) {
+ boolean runInBackground= true;
+ try {
+ runInBackground= configuration.getAttribute(IDebugUIConstants.ATTR_RUN_IN_BACKGROUND, true);
+ } catch (CoreException ce) {
+ DebugUIPlugin.log(ce);
+ }
+ return runInBackground;
}
private void updateLocalSharedFromConfig(ILaunchConfiguration config) {
@@ -453,6 +499,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
*/
public void setDefaults(ILaunchConfigurationWorkingCopy config) {
config.setContainer(null);
+ config.setAttribute(IDebugUIConstants.ATTR_RUN_IN_BACKGROUND, true);
}
/**
@@ -461,6 +508,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
public void performApply(ILaunchConfigurationWorkingCopy configuration) {
updateConfigFromLocalShared(configuration);
updateConfigFromFavorites(configuration);
+ setAttribute(IDebugUIConstants.ATTR_RUN_IN_BACKGROUND, configuration, fRunInBackgroundButton.getSelection(), true);
}
/**

Back to the top