Author: vyemialyanchyk
Date: 2009-01-27 12:46:18 -0500 (Tue, 27 Jan 2009)
New Revision: 13294
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionDelegate.java
Log:
JBIDE-3645
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionDelegate.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionDelegate.java 2009-01-27
17:41:05 UTC (rev 13293)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionDelegate.java 2009-01-27
17:46:18 UTC (rev 13294)
@@ -68,7 +68,13 @@
}
public boolean isCUSelected() {
IWorkbench workbench = Activator.getDefault().getWorkbench();
+ if (workbench == null || workbench.getActiveWorkbenchWindow() == null) {
+ return false;
+ }
IWorkbenchPage page = workbench.getActiveWorkbenchWindow().getActivePage();
+ if (page == null) {
+ return false;
+ }
IEditorPart editor = page.getActiveEditor();
if (editor instanceof CompilationUnitEditor) {
return true;
Show replies by date