Author: vyemialyanchyk
Date: 2008-10-22 09:04:59 -0400 (Wed, 22 Oct 2008)
New Revision: 11072
Modified:
branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java
Log:
JBIDE-2956
Modified:
branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/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)
+++
branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java 2008-10-22
13:04:59 UTC (rev 11072)
@@ -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$