Author: vyemialyanchyk
Date: 2008-10-22 08:57:57 -0400 (Wed, 22 Oct 2008)
New Revision: 11071
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java
Log:
JBIDE-2956
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java 2008-10-22
10:05:13 UTC (rev 11070)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java 2008-10-22
12:57:57 UTC (rev 11071)
@@ -28,7 +28,7 @@
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.dom.AST;
import org.eclipse.jdt.core.dom.ASTParser;
-import org.eclipse.jdt.core.dom.TypeDeclaration;
+import org.eclipse.jdt.core.dom.AbstractTypeDeclaration;
import org.eclipse.jdt.internal.core.JavaElement;
import org.eclipse.jdt.internal.core.JavaElementInfo;
import org.eclipse.jdt.internal.core.JavaProject;
@@ -178,7 +178,10 @@
else {
fullyQualifiedName = ""; //$NON-NLS-1$
}
- fullyQualifiedName += ((TypeDeclaration)(resultCU.types().get(0))).getName();
+ Object tmp = resultCU.types().get(0);
+ if (tmp instanceof AbstractTypeDeclaration) {
+ fullyQualifiedName += ((AbstractTypeDeclaration)tmp).getName();
+ }
}
} catch (IllegalArgumentException e) {
HibernateConsolePlugin.getDefault().logErrorMessage("IllegalArgumentException:
", e); //$NON-NLS-1$