Author: dazarov
Date: 2007-07-30 12:37:04 -0400 (Mon, 30 Jul 2007)
New Revision: 2726
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmDiagram.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ExpandeableShapeEditPart.java
Log:
http://jira.jboss.com/jira/browse/EXIN-369
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmDiagram.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmDiagram.java 2007-07-30
16:03:12 UTC (rev 2725)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmDiagram.java 2007-07-30
16:37:04 UTC (rev 2726)
@@ -536,7 +536,6 @@
public String getKey(Shape shape) {
Object element = shape.getOrmElement();
- System.out.println("<<<<< +++++ Element - "+element);
String key=null;
if (element instanceof RootClass) {
key = ((RootClass)ormElement).getEntityName();
@@ -545,12 +544,10 @@
key = table.getSchema() + "." + table.getName();
} else if (element instanceof Property) {
SpecialRootClass specialRootClass = new SpecialRootClass((Property)element);
- System.out.println("specialRootClass - "+specialRootClass.getClassName());
key = specialRootClass.getEntityName();
} else if (element instanceof Subclass) {
key = ((Subclass)element).getEntityName();
}
- System.out.println("KEY - "+key);
return key;
}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ExpandeableShapeEditPart.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ExpandeableShapeEditPart.java 2007-07-30
16:03:12 UTC (rev 2725)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ExpandeableShapeEditPart.java 2007-07-30
16:37:04 UTC (rev 2726)
@@ -52,6 +52,15 @@
throw new IllegalArgumentException();
}
}
+
+ public void addNotify() {
+ super.addNotify();
+ if(!((ExpandeableShape)getModel()).isReferenceVisible()){
+ refreshReferences((Shape)getCastedModel(),
((ExpandeableShape)getCastedModel()).isReferenceVisible());
+ ((TitleLabel)getFigure()).setHidden(!((ExpandeableShape)getCastedModel()).isReferenceVisible());
+ }
+ }
+
public void performRequest(Request req) {
if(RequestConstants.REQ_OPEN.equals(req.getType())) {
((ExpandeableShape)getModel()).refreshReferences(getViewer().getContents().getModel());