aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Moffatt2011-08-09 13:37:57 (EDT)
committerPaul Webster2011-08-25 10:22:03 (EDT)
commit0dcdf1bb355c25ca0114d3598c26a4d5ca49280b (patch)
treefc90dfe01cfa8656d026481afeef94df7e22fac7
parent1e6c7041bc55ab6c0c932de94d5ac6051f07cac5 (diff)
downloadeclipse.platform.ui-0dcdf1bb355c25ca0114d3598c26a4d5ca49280b.zip
eclipse.platform.ui-0dcdf1bb355c25ca0114d3598c26a4d5ca49280b.tar.gz
eclipse.platform.ui-0dcdf1bb355c25ca0114d3598c26a4d5ca49280b.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);
}
}