Author: dgeraskov
Date: 2007-12-22 08:27:16 -0500 (Sat, 22 Dec 2007)
New Revision: 5431
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenMappingAction.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1412
Open mapping file with annotations added for component properties
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenMappingAction.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenMappingAction.java 2007-12-22
13:12:17 UTC (rev 5430)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenMappingAction.java 2007-12-22
13:27:16 UTC (rev 5431)
@@ -20,6 +20,7 @@
import org.hibernate.console.ConsoleConfiguration;
import org.hibernate.eclipse.console.HibernateConsolePlugin;
import org.hibernate.eclipse.console.utils.ProjectUtils;
+import org.hibernate.mapping.Component;
import org.hibernate.mapping.PersistentClass;
import org.hibernate.mapping.Property;
import org.hibernate.mapping.RootClass;
@@ -142,10 +143,10 @@
return;
}
- if (parentProperty.getPersistentClass() != null){
+ if (parentProperty.getPersistentClass() != null &&
parentProperty.isComposite()){
PersistentClass rootClass = parentProperty.getPersistentClass();
if (OpenFileActionUtils.rootClassHasAnnotations(consoleConfiguration, configXMLFile,
rootClass)) {
- String fullyQualifiedName = OpenFileActionUtils.getPersistentClassName(rootClass);
+ String fullyQualifiedName =((Component)((Property)
parentProperty).getValue()).getComponentClassName();
new OpenSourceAction().run(compositeProperty, proj, fullyQualifiedName);
}
}