Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui')
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/AbstractActionDelegate.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/AbstractActionDelegate.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/AbstractActionDelegate.java
index d4e89b1dc..33d4a861e 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/AbstractActionDelegate.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/AbstractActionDelegate.java
@@ -147,9 +147,11 @@ public abstract class AbstractActionDelegate extends EventManager implements
}
public IWorkbenchWindow getWindow() {
- if (event != null) return HandlerUtil.getActiveWorkbenchWindow(event);
+ // In Eclipse 4.x, the HandlerUtil.getActiveWorkbenchWindow(event) may return null
+ if (event != null && HandlerUtil.getActiveWorkbenchWindow(event) != null) return HandlerUtil.getActiveWorkbenchWindow(event);
if (part != null) return part.getSite().getWorkbenchWindow();
if (window != null) return window;
+ if (PlatformUI.getWorkbench() != null) return PlatformUI.getWorkbench().getActiveWorkbenchWindow();
return null;
}

Back to the top