Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2003-01-07 15:26:33 +0000
committerDarin Wright2003-01-07 15:26:33 +0000
commit81fbc0917ebe1f29f8ec9901d74f8f42a09b9023 (patch)
tree918f2f5fcc97951ac1076b0243a240c0747b32db /org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
parentf934cb10f2d9f85cbf4724f0df48e3ba82d47dfa (diff)
downloadeclipse.platform.debug-81fbc0917ebe1f29f8ec9901d74f8f42a09b9023.tar.gz
eclipse.platform.debug-81fbc0917ebe1f29f8ec9901d74f8f42a09b9023.tar.xz
eclipse.platform.debug-81fbc0917ebe1f29f8ec9901d74f8f42a09b9023.zip
bug 27989
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
index 163eec82c..d3b25b3d6 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
@@ -1026,4 +1026,36 @@ public class LaunchConfigurationTabGroupViewer extends Viewer {
protected Composite getVisibleArea() {
return fVisibleArea;
}
+
+ /**
+ * Sets the displayed tab to the given tab. Has no effect if the specified
+ * tab is not one of the tabs being displayed in the dialog currently.
+ *
+ * @param tab the tab to display/activate
+ */
+ public void setActiveTab(ILaunchConfigurationTab tab) {
+ ILaunchConfigurationTab[] tabs = getTabs();
+ for (int i = 0; i < tabs.length; i++) {
+ ILaunchConfigurationTab configurationTab = tabs[i];
+ if (configurationTab.equals(tab)) {
+ setActiveTab(i);
+ return;
+ }
+ }
+ }
+
+ /**
+ * Sets the displayed tab to the tab with the given index. Has no effect if
+ * the specified index is not within the limits of the tabs returned by
+ * <code>getTabs()</code>.
+ *
+ * @param index the index of the tab to dispay
+ */
+ public void setActiveTab(int index) {
+ ILaunchConfigurationTab[] tabs = getTabs();
+ if (index >= 0 && index < tabs.length) {
+ getTabFolder().setSelection(index);
+ handleTabSelected();
+ }
+ }
}

Back to the top