--- a/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/status/ConnectionStatusReconciler.java Tue Feb 16 09:29:07 2010 -0600
+++ b/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/status/ConnectionStatusReconciler.java Tue Feb 16 09:32:37 2010 -0600
@@ -130,14 +130,18 @@
}
private void showConnectionsView() {
- // avoid deadlock if this called as a result of a launch sequence issuing a "select connection" dialog
+ // avoid deadlock with RunRunnableWhenWorkbenchVisibleJob
+ // if this called as a result of a launch sequence issuing a "select connection" dialog
final Shell shell = WorkbenchUtils.getActiveShell();
- final boolean isVisible[] = { true };
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- isVisible[0] = shell != null && shell.isVisible();
- }
- });
+ final boolean isVisible[] = { false };
+
+ if (shell != null) {
+ Display.getDefault().syncExec(new Runnable() {
+ public void run() {
+ isVisible[0] = shell.isVisible();
+ }
+ });
+ }
Runnable runnable = new Runnable() {
public void run() {
@@ -148,7 +152,7 @@
}
};
- if (shell == null || !isVisible[0]) {
+ if (!isVisible[0]) {
RunRunnableWhenWorkbenchVisibleJob.start(runnable);
} else {
Display.getDefault().asyncExec(runnable);