Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSarika Sinha2018-02-01 10:42:49 +0000
committerSarika Sinha2018-02-01 10:42:49 +0000
commit694050ca6ce664e9f5df400eb3aef8bce219d8cc (patch)
treec437e1fc01f2668f4c5a274ed965e6a9ae3355aa
parent9a76f3f906342f40b0cc33ed960a842c17abad0e (diff)
downloadeclipse.platform.debug-694050ca6ce664e9f5df400eb3aef8bce219d8cc.tar.gz
eclipse.platform.debug-694050ca6ce664e9f5df400eb3aef8bce219d8cc.tar.xz
eclipse.platform.debug-694050ca6ce664e9f5df400eb3aef8bce219d8cc.zip
Bug 530603 - [9] Expose API to get ILaunchConfiguration forI20180202-0315I20180201-2325
ILaunchConfigurationDialog Change-Id: I872e1381def3e8a232473d62077a884b6e1f1928
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java25
1 files changed, 24 insertions, 1 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java
index 5624f3039..478bb34b5 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 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
@@ -62,6 +62,7 @@ import org.eclipse.debug.internal.ui.contexts.DebugContextManager;
import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationDialog;
import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager;
import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationPropertiesDialog;
+import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer;
import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog;
import org.eclipse.debug.internal.ui.launchConfigurations.LaunchGroupExtension;
import org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension;
@@ -1350,4 +1351,26 @@ public class DebugUITools {
return ToggleBreakpointsTargetManager.getDefault();
}
+ /**
+ * Returns the ILaunchConfiguration corresponding to
+ * ILaunchConfigurationDialog
+ *
+ * @param dialog The input launch configuration dialog
+ * @return {@link ILaunchConfiguration} Corresponding launch configuration
+ * @since 3.13
+ */
+ public static ILaunchConfiguration getLaunchConfiguration(ILaunchConfigurationDialog dialog) {
+ if (dialog instanceof LaunchConfigurationsDialog) {
+ LaunchConfigurationTabGroupViewer tabViewer = ((LaunchConfigurationsDialog) dialog).getTabViewer();
+ if (tabViewer != null) {
+ Object input = tabViewer.getInput();
+ if (input instanceof ILaunchConfiguration) {
+ ILaunchConfiguration configuration = (ILaunchConfiguration) input;
+ return configuration;
+ }
+ }
+ }
+ return null;
+ }
+
}

Back to the top