Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHannes Wellmann2021-02-11 20:08:39 +0000
committerSarika Sinha2021-02-22 11:01:21 +0000
commitc239e1061cd3e02c6e3cb7f34b2be0be7fea7355 (patch)
treefaa275a7f82e7b8458cc681fd00a363bfeb520d5 /org.eclipse.debug.ui/ui
parentee6cc06388c729e1abe892abd01fa0a2c271793c (diff)
downloadeclipse.platform.debug-c239e1061cd3e02c6e3cb7f34b2be0be7fea7355.tar.gz
eclipse.platform.debug-c239e1061cd3e02c6e3cb7f34b2be0be7fea7355.tar.xz
eclipse.platform.debug-c239e1061cd3e02c6e3cb7f34b2be0be7fea7355.zip
Change-Id: I6f77f33c27028c06c4afb58eae9604eeab317866 Signed-off-by: Hannes Wellmann <wellmann.hannes1@gmx.net>
Diffstat (limited to 'org.eclipse.debug.ui/ui')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java1
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties3
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java30
3 files changed, 32 insertions, 2 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java
index d2ed415e3..84a080257 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java
@@ -63,6 +63,7 @@ public class LaunchConfigurationsMessages extends NLS {
public static String CommonTab_AttributeLabel_AppendToFile;
public static String CommonTab_AttributeLabel_LaunchInBackground;
public static String CommonTab_AttributeLabel_FavoriteGroups;
+ public static String CommonTab_AttributeLabel_TerminateDescendants;
public static String CompileErrorProjectPromptStatusHandler_0;
public static String CompileErrorProjectPromptStatusHandler_1;
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 a26a4d1cc..5a9456a68 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
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2000, 2019 IBM Corporation and others.
+# Copyright (c) 2000, 2021 IBM Corporation and others.
#
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
@@ -55,6 +55,7 @@ CommonTab_AttributeLabel_CaptureInFile=Capture in file
CommonTab_AttributeLabel_AppendToFile=Append to file
CommonTab_AttributeLabel_LaunchInBackground=Launch in background
CommonTab_AttributeLabel_FavoriteGroups=Favorite groups
+CommonTab_AttributeLabel_TerminateDescendants=&Terminate child-processes if terminating the launched process
CompileErrorPromptStatusHandler_0=Errors in Workspace
CompileErrorPromptStatusHandler_1=Errors exist in a required project. Continue launch?
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 5e34555e7..405867a5e 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
@@ -124,6 +124,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
private Text fSharedLocationText;
private Button fSharedLocationButton;
private Button fLaunchInBackgroundButton;
+ private Button fTerminateDescendantsButton;
private Button fDefaultEncodingButton;
private Button fAltEncodingButton;
private Combo fEncodingCombo;
@@ -173,6 +174,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
createEncodingComponent(comp);
createOutputCaptureComponent(comp);
createLaunchInBackgroundComponent(comp);
+ createTerminateDescendantsButtonComponent(comp);
}
/**
@@ -501,6 +503,22 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
}
/**
+ * Creates the controls needed to edit the terminate descendants attribute of an
+ * external tool
+ *
+ * @param parent the composite to create the controls in
+ */
+ private void createTerminateDescendantsButtonComponent(Composite parent) {
+ fTerminateDescendantsButton = createCheckButton(parent,
+ LaunchConfigurationsMessages.CommonTab_AttributeLabel_TerminateDescendants);
+ GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
+ data.horizontalSpan = 2;
+ fTerminateDescendantsButton.setLayoutData(data);
+ fTerminateDescendantsButton.setFont(parent.getFont());
+ fTerminateDescendantsButton.addSelectionListener(widgetSelectedAdapter(e -> updateLaunchConfigurationDialog()));
+ }
+
+ /**
* handles the shared radio button being selected
*/
private void handleSharedRadioButtonSelected() {
@@ -621,6 +639,9 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
updateLaunchInBackground(configuration);
updateEncoding(configuration);
updateConsoleOutput(configuration);
+
+ boolean terminateDescendants = getAttribute(configuration, DebugPlugin.ATTR_TERMINATE_DESCENDANTS, true);
+ fTerminateDescendantsButton.setSelection(terminateDescendants);
}
/**
@@ -934,7 +955,13 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
public void performApply(ILaunchConfigurationWorkingCopy configuration) {
updateConfigFromLocalShared(configuration);
updateConfigFromFavorites(configuration);
- setAttribute(IDebugUIConstants.ATTR_LAUNCH_IN_BACKGROUND, configuration, fLaunchInBackgroundButton.getSelection(), true);
+
+ boolean launchInBackground = fLaunchInBackgroundButton.getSelection();
+ setAttribute(IDebugUIConstants.ATTR_LAUNCH_IN_BACKGROUND, configuration, launchInBackground, true);
+
+ boolean terminateDescendants = fTerminateDescendantsButton.getSelection();
+ setAttribute(DebugPlugin.ATTR_TERMINATE_DESCENDANTS, configuration, terminateDescendants, true);
+
String encoding = null;
if(fAltEncodingButton.getSelection()) {
encoding = fEncodingCombo.getText().trim();
@@ -1022,6 +1049,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
getAttributesLabelsForPrototype().put(IDebugUIConstants.ATTR_APPEND_TO_FILE, LaunchConfigurationsMessages.CommonTab_AttributeLabel_AppendToFile);
getAttributesLabelsForPrototype().put(IDebugUIConstants.ATTR_LAUNCH_IN_BACKGROUND, LaunchConfigurationsMessages.CommonTab_AttributeLabel_LaunchInBackground);
getAttributesLabelsForPrototype().put(IDebugUIConstants.ATTR_FAVORITE_GROUPS, LaunchConfigurationsMessages.CommonTab_AttributeLabel_FavoriteGroups);
+ getAttributesLabelsForPrototype().put(DebugPlugin.ATTR_TERMINATE_DESCENDANTS, LaunchConfigurationsMessages.CommonTab_AttributeLabel_TerminateDescendants);
}
/**

Back to the top