diff options
author | Darin Wright | 2004-11-24 04:41:06 +0000 |
---|---|---|
committer | Darin Wright | 2004-11-24 04:41:06 +0000 |
commit | 4b72b628ae66e1d31a50a2a714488c413db8a8db (patch) | |
tree | c06d10253af97b081a3cdd3885a6184626146e55 /org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java | |
parent | f957db58fe9eda504e0a30de1a12fd5a0ac0a7c1 (diff) | |
download | eclipse.platform.debug-4b72b628ae66e1d31a50a2a714488c413db8a8db.tar.gz eclipse.platform.debug-4b72b628ae66e1d31a50a2a714488c413db8a8db.tar.xz eclipse.platform.debug-4b72b628ae66e1d31a50a2a714488c413db8a8db.zip |
Bug 53917 - Run dialog's tab view reset to first tab each time a config is selected.
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 | 20 |
1 files changed, 18 insertions, 2 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 b8185254d..77dada077 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 @@ -615,7 +615,13 @@ public class LaunchConfigurationTabGroupViewer extends Viewer { if (getTabType() != null && getTabType().equals(configType) && !(getTabGroup() instanceof PerspectiveTabGroup)) { return; } - + + // try to keep on same tab + Class tabKind = null; + if (getActiveTab() != null) { + tabKind = getActiveTab().getClass(); + } + // Build the new tabs ILaunchConfigurationTabGroup group = null; try { @@ -629,6 +635,16 @@ public class LaunchConfigurationTabGroupViewer extends Viewer { setTabGroup(group); setTabType(configType); + // select same tab as before, if possible + ILaunchConfigurationTab[] tabs = getTabs(); + for (int i = 0; i < tabs.length; i++) { + ILaunchConfigurationTab tab = tabs[i]; + if (tab.getClass().equals(tabKind)) { + setActiveTab(tab); + break; + } + } + fDescription = getDescription(configType); } @@ -1154,7 +1170,7 @@ public class LaunchConfigurationTabGroupViewer extends Viewer { * the tab being entered. */ protected void handleTabSelected() { - if (isDisposingTabs()) { + if (isDisposingTabs() || isInitializingTabs()) { return; } ILaunchConfigurationTab[] tabs = getTabs(); |