diff options
author | Darin Wright | 2003-01-07 15:26:33 +0000 |
---|---|---|
committer | Darin Wright | 2003-01-07 15:26:33 +0000 |
commit | 81fbc0917ebe1f29f8ec9901d74f8f42a09b9023 (patch) | |
tree | 918f2f5fcc97951ac1076b0243a240c0747b32db /org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java | |
parent | f934cb10f2d9f85cbf4724f0df48e3ba82d47dfa (diff) | |
download | eclipse.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.java | 32 |
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(); + } + } } |