Author: dazarov
Date: 2007-07-30 14:16:19 -0400 (Mon, 30 Jul 2007)
New Revision: 2730
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ComponentShapeEditPart.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/parts/ComponentShapeEditPart.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ComponentShapeEditPart.java 2007-07-30
17:42:34 UTC (rev 2729)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ComponentShapeEditPart.java 2007-07-30
18:16:19 UTC (rev 2730)
@@ -54,8 +54,24 @@
} else {
throw new IllegalArgumentException();
}
- }
+ }
+ public void addNotify() {
+ super.addNotify();
+ if(!((ExpandeableShape)getModel()).isReferenceVisible()){
+ int i = figure.getPreferredSize().width;
+ ((ComponentFigure)figure).setChildsHiden(true);
+
+ figure.setSize(i,-1);
+
+ referenceList.add((OrmShape)getCastedModel().getParent());
+ refreshReference((ExpandeableShape)getCastedModel(),
((ExpandeableShape)getCastedModel()).isReferenceVisible());
+
+
+ ((OrmShape)getParent().getModel()).refreshReference();
+ }
+ }
+
public void performRequest(Request req) {
if(RequestConstants.REQ_OPEN.equals(req.getType()) && getModel() instanceof
ComponentShape) {
((ComponentShape)getModel()).refreshChildsHiden(((OrmDiagram)getViewer().getContents().getModel()));