Author: mdryakhlenkov
Date: 2007-07-11 10:32:54 -0400 (Wed, 11 Jul 2007)
New Revision: 2389
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelImageVisitor.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelNameVisitor.java
Log:
EXIN-366: Adding elements on the diagram by double-click on fields of classes which have
additional information in mapping files
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelImageVisitor.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelImageVisitor.java 2007-07-11
14:22:06 UTC (rev 2388)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelImageVisitor.java 2007-07-11
14:32:54 UTC (rev 2389)
@@ -52,9 +52,11 @@
public Object visitPersistentField(Property field, Object argument) {
if (field !=null){
- if (field.getType().isCollectionType()) {
- return
ViewPlugin.getImageDescriptor(BUNDLE.getString("OrmModelImageVisitor.PersistentFieldCollection"));
//$NON-NLS-1$
- }
+ try {
+ if (field.getType().isCollectionType()) {
+ return
ViewPlugin.getImageDescriptor(BUNDLE.getString("OrmModelImageVisitor.PersistentFieldCollection"));
//$NON-NLS-1$
+ }
+ } catch (Exception e) {}
}
return
ViewPlugin.getImageDescriptor(BUNDLE.getString("OrmModelImageVisitor.PersistentFieldNot_mapped"));
//$NON-NLS-1$
}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelNameVisitor.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelNameVisitor.java 2007-07-11
14:22:06 UTC (rev 2388)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelNameVisitor.java 2007-07-11
14:32:54 UTC (rev 2389)
@@ -595,7 +595,10 @@
StringBuffer name = new StringBuffer();
name.append(field.getName());
name.append(BUNDLE.getString("OrmModelNameVisitor.Colon"));
- String typeString = field.getType().getReturnedClass().getName();
+ String typeString = "";
+ try {
+ typeString = field.getType().getReturnedClass().getName();
+ } catch (Exception e) {}
if (typeString != null) {
/* IPersistentValueMapping value = null;