diff --git a/debug/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java b/debug/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java index 1f6b05506b6..a8d5180da8d 100644 --- a/debug/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java +++ b/debug/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java @@ -1183,10 +1183,7 @@ public boolean canSave() { * @return if the dialog can launch in its current state */ public boolean canLaunch() { - if(fInitializingTabs) { - return false; - } - if (getWorkingCopy() == null) { + if (fInitializingTabs || (getWorkingCopy() == null)) { return false; } try { @@ -1274,11 +1271,7 @@ private boolean hasMultipleDelegates() { * @return the error message for the tab */ public String getErrorMesssage() { - if (fInitializingTabs) { - return null; - } - - if (getWorkingCopy() == null) { + if (fInitializingTabs || (getWorkingCopy() == null)) { return null; } try { @@ -1455,12 +1448,14 @@ protected void handleTabSelected() { fCurrentTabIndex = fTabFolder.getSelectionIndex(); ILaunchConfigurationTab[] tabs = getTabs(); - if (previousTabIndex == fCurrentTabIndex || tabs == null || tabs.length == 0 + if (tabs == null || tabs.length == 0 || previousTabIndex > (tabs.length - 1)) { return; } - propagateTabDeactivation(previousTabIndex); + if (previousTabIndex != fCurrentTabIndex) { + propagateTabDeactivation(previousTabIndex); + } propagateTabActivation(); }