Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjszursze2002-04-03 23:32:28 +0000
committerjszursze2002-04-03 23:32:28 +0000
commit2daea3e5b94bc4cb2c26f4c63b30781eeb460637 (patch)
treebec9aa243dcbdf6cc85fd202532b0164a518afcf
parent40e7aa483b138009a881ebb49ba7c20f076e5b99 (diff)
downloadeclipse.platform.debug-2daea3e5b94bc4cb2c26f4c63b30781eeb460637.tar.gz
eclipse.platform.debug-2daea3e5b94bc4cb2c26f4c63b30781eeb460637.tar.xz
eclipse.platform.debug-2daea3e5b94bc4cb2c26f4c63b30781eeb460637.zip
fix for 11710
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationDialog.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationDialog.java
index 9f2c68f79..ee1e06d86 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationDialog.java
@@ -1588,6 +1588,14 @@ public class LaunchConfigurationDialog extends TitleAreaDialog
*/
protected void handleDeletePressed() {
IStructuredSelection selection = getTreeViewerSelection();
+ // The 'Delete' button is disabled if the selection contains anything other than configurations (no types)
+ ILaunchConfiguration firstSelectedConfig = (ILaunchConfiguration) selection.getFirstElement();
+ ILaunchConfigurationType firstSelectedConfigType = null;
+ try {
+ firstSelectedConfigType = firstSelectedConfig.getType();
+ } catch (CoreException ce) {
+ DebugUIPlugin.log(ce);
+ }
Iterator iterator = selection.iterator();
while (iterator.hasNext()) {
clearLaunchConfiguration();
@@ -1596,10 +1604,16 @@ public class LaunchConfigurationDialog extends TitleAreaDialog
try {
((ILaunchConfiguration)selectedElement).delete();
} catch (CoreException ce) {
- DebugUIPlugin.log(ce);
+ DebugUIPlugin.log(ce);
}
}
}
+
+ // Reset selection to the config type of the first selected configuration
+ if (firstSelectedConfigType != null) {
+ IStructuredSelection newSelection = new StructuredSelection(firstSelectedConfigType);
+ getTreeViewer().setSelection(newSelection);
+ }
}
/**

Back to the top