Author: mdryakhlenkov
Date: 2007-07-12 09:24:46 -0400 (Thu, 12 Jul 2007)
New Revision: 2400
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmLabelProvider.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
Add <joined-subclass> presentation
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmLabelProvider.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmLabelProvider.java 2007-07-12
13:23:15 UTC (rev 2399)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmLabelProvider.java 2007-07-12
13:24:46 UTC (rev 2400)
@@ -33,6 +33,7 @@
import org.hibernate.mapping.RootClass;
import org.hibernate.mapping.SimpleValue;
import org.hibernate.mapping.SingleTableSubclass;
+import org.hibernate.mapping.Subclass;
import org.hibernate.mapping.Table;
public class OrmLabelProvider extends LabelProvider implements IColorProvider,
IFontProvider {
@@ -83,8 +84,8 @@
} else {
return name;
}
- } else if (element instanceof SingleTableSubclass) {
- String name =
(String)ormModelNameVisitor.visitPersistentClass((SingleTableSubclass)element, null);
+ } else if (element instanceof Subclass) {
+ String name = (String)ormModelNameVisitor.visitPersistentClass((Subclass)element,
null);
if (name == null) {
return "OrmElement";
} else {
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-12
13:23:15 UTC (rev 2399)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelNameVisitor.java 2007-07-12
13:24:46 UTC (rev 2400)
@@ -20,6 +20,7 @@
import org.hibernate.mapping.Property;
import org.hibernate.mapping.RootClass;
import org.hibernate.mapping.SingleTableSubclass;
+import org.hibernate.mapping.Subclass;
import org.hibernate.mapping.Table;
/**
@@ -495,7 +496,7 @@
return name.toString();
}
- public Object visitPersistentClass(SingleTableSubclass clazz, Object argument) {
+ public Object visitPersistentClass(Subclass clazz, Object argument) {
StringBuffer name = new StringBuffer();
// if (((OrmContentProvider) viewer.getContentProvider()).getTip() ==
OrmContentProvider.PACKAGE_CLASS_FIELD_CONTENT_PROVIDER) {
Show replies by date