aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Moffatt2011-08-09 13:37:57 (EDT)
committerRemy Suen2011-08-17 13:49:34 (EDT)
commit73671b13e7fae001d73f6bcda9fadd1b71d8b0f2 (patch)
tree12faca44d65f4e873722047ff9c16c9bc75e972e
parent473fc66d967f5fd9dc1950af9440a7440af49932 (diff)
downloadeclipse.platform.ui-73671b13e7fae001d73f6bcda9fadd1b71d8b0f2.zip
eclipse.platform.ui-73671b13e7fae001d73f6bcda9fadd1b71d8b0f2.tar.gz
eclipse.platform.ui-73671b13e7fae001d73f6bcda9fadd1b71d8b0f2.tar.bz2
Fix for Bug 351212 - Workspace failed to start due to Problems
View getting activated outside SWT Display Thread
-rw-r--r--bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEWorkbenchPlugin.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEWorkbenchPlugin.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEWorkbenchPlugin.java
index 62cfc17..1449266 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEWorkbenchPlugin.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEWorkbenchPlugin.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -363,7 +363,7 @@ public class IDEWorkbenchPlugin extends AbstractUIPlugin {
return;
if (workbench == null || workbench.isStarting()) {
- Display.getDefault().timerExec(PROBLEMS_VIEW_CREATION_DELAY, this);
+ Display.getCurrent().timerExec(PROBLEMS_VIEW_CREATION_DELAY, this);
return;
}
@@ -387,6 +387,10 @@ public class IDEWorkbenchPlugin extends AbstractUIPlugin {
}
}
};
- Display.getDefault().timerExec(PROBLEMS_VIEW_CREATION_DELAY, r);
+ Display display = Display.getCurrent();
+ if (display != null)
+ display.timerExec(PROBLEMS_VIEW_CREATION_DELAY, r);
+ else
+ Display.getDefault().asyncExec(r);
}
}