Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2003-06-26 17:26:08 +0000
committerDarin Wright2003-06-26 17:26:08 +0000
commitfed02034e04120d444c33e703470ee744adf7c55 (patch)
treeaec7fd97d0c28c5eaa8794c9b5b0ba6a052b16ea /org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
parent859415a773a9398efdb9681b881595e20fb9e706 (diff)
downloadeclipse.platform.debug-fed02034e04120d444c33e703470ee744adf7c55.tar.gz
eclipse.platform.debug-fed02034e04120d444c33e703470ee744adf7c55.tar.xz
eclipse.platform.debug-fed02034e04120d444c33e703470ee744adf7c55.zip
bug 39258 - Launch Configuration dialog: Screen cheese when switching between nodes
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.java70
1 files changed, 42 insertions, 28 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 96365d104..538aaa948 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
@@ -139,6 +139,11 @@ public class LaunchConfigurationTabGroupViewer extends Viewer {
private boolean fInitializingTabs = false;
/**
+ * Controls when the redraw flag is set on the visible area
+ */
+ private boolean fRedraw = true;
+
+ /**
* Constructs a viewer in the given composite, contained by the given
* launch configuration dialog.
*
@@ -447,32 +452,44 @@ public class LaunchConfigurationTabGroupViewer extends Viewer {
*/
protected void inputChanged(Object input) {
fInput = input;
- if (input instanceof ILaunchConfiguration) {
- ILaunchConfiguration configuration = (ILaunchConfiguration)input;
- setOriginal(configuration);
- try {
- setWorkingCopy(configuration.getWorkingCopy());
- } catch (CoreException e) {
- errorDialog(e);
- }
- displayInstanceTabs();
- } else if (input instanceof ILaunchConfigurationType) {
- ILaunchConfiguration configuration = getSharedTypeConfig((ILaunchConfigurationType)input);
- setOriginal(configuration);
- try {
- setWorkingCopy(configuration.getWorkingCopy());
- } catch (CoreException e) {
- errorDialog(e);
+ Runnable r = new Runnable() {
+ public void run() {
+ if (fInput instanceof ILaunchConfiguration) {
+ ILaunchConfiguration configuration = (ILaunchConfiguration)fInput;
+ setOriginal(configuration);
+ try {
+ setWorkingCopy(configuration.getWorkingCopy());
+ } catch (CoreException e) {
+ errorDialog(e);
+ }
+ displayInstanceTabs();
+ } else if (fInput instanceof ILaunchConfigurationType) {
+ ILaunchConfiguration configuration = getSharedTypeConfig((ILaunchConfigurationType)fInput);
+ setOriginal(configuration);
+ try {
+ setWorkingCopy(configuration.getWorkingCopy());
+ } catch (CoreException e) {
+ errorDialog(e);
+ }
+ displaySharedTabs();
+ } else {
+ setOriginal(null);
+ setWorkingCopy(null);
+ getVisibleArea().setVisible(false);
+ disposeExistingTabs();
+ }
+ setRedraw(true);
}
- displaySharedTabs();
- } else {
- setOriginal(null);
- setWorkingCopy(null);
- getVisibleArea().setVisible(false);
- disposeExistingTabs();
- }
+ };
+ BusyIndicator.showWhile(getShell().getDisplay(), r);
}
+ private void setRedraw(boolean b) {
+ if (fRedraw != b) {
+ fRedraw = b;
+ getVisibleArea().setRedraw(fRedraw);
+ }
+ }
/**
* Displays tabs for the current working copy
*/
@@ -628,10 +645,8 @@ public class LaunchConfigurationTabGroupViewer extends Viewer {
* Create the tabs in the configuration edit area for the given tab group.
*/
private void showTabsFor(ILaunchConfigurationTabGroup tabGroup) {
-
- // Avoid flicker
- getControl().setRedraw(false);
-
+ // turn off redraw
+ setRedraw(false);
// Dispose the current tabs
disposeExistingTabs();
@@ -655,7 +670,6 @@ public class LaunchConfigurationTabGroupViewer extends Viewer {
}
}
- getControl().setRedraw(true);
}
/**

Back to the top