[jbosstools-commits] JBoss Tools SVN: r43269 - branches/jbosstools-3.3.x/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Tue Aug 28 12:34:33 EDT 2012


Author: dgolovin
Date: 2012-08-28 12:34:33 -0400 (Tue, 28 Aug 2012)
New Revision: 43269

Modified:
   branches/jbosstools-3.3.x/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/TypeImpl.java
Log:
JBIDE-12179 (Invalid Error marker when using Hibernate @Type annotation)
backported fix from trunk

Modified: branches/jbosstools-3.3.x/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/TypeImpl.java
===================================================================
--- branches/jbosstools-3.3.x/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/TypeImpl.java	2012-08-28 16:32:45 UTC (rev 43268)
+++ branches/jbosstools-3.3.x/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/TypeImpl.java	2012-08-28 16:34:33 UTC (rev 43269)
@@ -25,6 +25,8 @@
 import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
 import org.eclipse.wst.validation.internal.provisional.core.IMessage;
 import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+import org.hibernate.type.TypeFactory;
+import org.jboss.tools.hibernate.jpt.core.internal.HibernateJptPlugin;
 import org.jboss.tools.hibernate.jpt.core.internal.context.HibernatePersistenceUnit;
 import org.jboss.tools.hibernate.jpt.core.internal.context.Messages;
 import org.jboss.tools.hibernate.jpt.core.internal.resource.java.TypeAnnotation;
@@ -140,7 +142,7 @@
 				messages.add(HibernateJpaValidationMessage.buildMessage(
 						IMessage.HIGH_SEVERITY,
 						TYPE_CANT_BE_EMPTY, this, range));
-			} else if (!getPersistenceUnit().hasTypeDef(type))	{
+			} else if (TypeFactory.basic(type) == null && !getPersistenceUnit().hasTypeDef(type))	{
 				IType lwType = null;
 				try {
 					lwType = getJpaProject().getJavaProject().findType(type);
@@ -159,7 +161,7 @@
 						 }
 					}
 				} catch (JavaModelException e) {
-					// just ignore it!
+					HibernateJptPlugin.logException(e);
 				}
 			}
 		}



More information about the jbosstools-commits mailing list