Author: snjeza
Date: 2011-02-20 17:06:46 -0500 (Sun, 20 Feb 2011)
New Revision: 29253
Modified:
trunk/maven/plugins/org.jboss.tools.maven.hibernate/src/org/jboss/tools/maven/hibernate/configurators/HibernateProjectConfigurator.java
Log:
JBIDE-8455 NPE in HibernateProjectConfigurator when importing maven or mavenArchetype
project example
Modified:
trunk/maven/plugins/org.jboss.tools.maven.hibernate/src/org/jboss/tools/maven/hibernate/configurators/HibernateProjectConfigurator.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.hibernate/src/org/jboss/tools/maven/hibernate/configurators/HibernateProjectConfigurator.java 2011-02-20
21:53:43 UTC (rev 29252)
+++
trunk/maven/plugins/org.jboss.tools.maven.hibernate/src/org/jboss/tools/maven/hibernate/configurators/HibernateProjectConfigurator.java 2011-02-20
22:06:46 UTC (rev 29253)
@@ -12,6 +12,7 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.preferences.IScopeContext;
+import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jface.preference.IPreferenceStore;
import org.hibernate.eclipse.console.properties.HibernatePropertiesConstants;
import org.hibernate.eclipse.console.utils.ProjectUtils;
@@ -43,7 +44,7 @@
return;
}
- if (isHibernateProject(mavenProject)) {
+ if (project.hasNature(JavaCore.NATURE_ID) && isHibernateProject(mavenProject))
{
IScopeContext scope = new ProjectScope(project);
Preferences node =
scope.getNode(HibernatePropertiesConstants.HIBERNATE_CONSOLE_NODE);
if (node != null) {
Show replies by date