Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2004-12-15 21:49:16 +0000
committerMichael Valenta2004-12-15 21:49:16 +0000
commit5ff178e2a36e940ab3af252a4fcea202ca031bd6 (patch)
treebc3528a86f5f79d7f9f619ad7c1e3192351af097 /bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java
parent89fbbc5f0887e8905e610ff7ab3a47c7c6de6a7e (diff)
downloadeclipse.platform.team-5ff178e2a36e940ab3af252a4fcea202ca031bd6.tar.gz
eclipse.platform.team-5ff178e2a36e940ab3af252a4fcea202ca031bd6.tar.xz
eclipse.platform.team-5ff178e2a36e940ab3af252a4fcea202ca031bd6.zip
Bug 75801 All workbench windows blockedI20041215
Diffstat (limited to 'bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java')
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java21
1 files changed, 5 insertions, 16 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java
index 1adcdb3ed..832f997bb 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java
@@ -290,23 +290,12 @@ public class Utils {
}
public static Shell findShell() {
- // First find the active shell of the display and use it.
- // We need to do this since the active shell may be model
- // in which case we nned to parent off that or risk deadlock
- Display display= Display.getCurrent();
- if (display == null) {
- display= Display.getDefault();
- }
- if (display != null) {
- return display.getActiveShell();
- }
- // Try to use the active window (although I suspect this will fail if the bove failed)
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if(window != null) {
- return window.getShell();
- }
+ Display display = TeamUIPlugin.getStandardDisplay();
+ Shell activeShell = display.getActiveShell();
+ if (activeShell != null)
+ return activeShell;
// worst case, just create our own.
- return new Shell(TeamUIPlugin.getStandardDisplay());
+ return new Shell(display);
}
public static IWorkbenchPartSite findSite(Control c) {

Back to the top