Author: dazarov
Date: 2007-06-29 09:57:39 -0400 (Fri, 29 Jun 2007)
New Revision: 2218
Removed:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/ExtendedShape.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ExtendedShapeEditPart.java
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/ComponentShape.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/ExpandeableShape.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/OrmDiagram.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/OrmShape.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ComponentShapeEditPart.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ExpandeableShapeEditPart.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/OrmEditPartFactory.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/OrmShapeEditPart.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ShapeEditPart.java
Log:
deleted ExtednedShape and ExtendedShapeEditPart
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/ComponentShape.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/ComponentShape.java 2007-06-29
13:38:16 UTC (rev 2217)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/ComponentShape.java 2007-06-29
13:57:39 UTC (rev 2218)
@@ -24,7 +24,7 @@
* @author Konstantin Mishin
*
*/
-public class ComponentShape extends ExtendedShape {
+public class ComponentShape extends ExpandeableShape {
public static final String SET_CHILDS_HIDEN = "set childs hiden";
protected boolean childsHiden = true;
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/ExpandeableShape.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/ExpandeableShape.java 2007-06-29
13:38:16 UTC (rev 2217)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/ExpandeableShape.java 2007-06-29
13:57:39 UTC (rev 2218)
@@ -27,7 +27,12 @@
public static final String SHOW_REFERENCES = "show references";
private boolean refHide = false;
+ protected List<Shape> shapes = new ArrayList<Shape>();
+ public List<Shape> getChildren() {
+ return shapes;
+ }
+
public ExpandeableShape(Object ioe) {
super(ioe);
}
Deleted:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/ExtendedShape.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/ExtendedShape.java 2007-06-29
13:38:16 UTC (rev 2217)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/ExtendedShape.java 2007-06-29
13:57:39 UTC (rev 2218)
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.hibernate.mapping.Collection;
-import org.hibernate.mapping.Property;
-
-
-public class ExtendedShape extends ExpandeableShape {
- protected List<Shape> shapes = new ArrayList<Shape>();
-
- protected ExtendedShape(Object ioe) {
- super(ioe);
- }
-
- public List<Shape> getChildren() {
- return shapes;
- }
-}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/OrmDiagram.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/OrmDiagram.java 2007-06-29
13:38:16 UTC (rev 2217)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/OrmDiagram.java 2007-06-29
13:57:39 UTC (rev 2218)
@@ -235,7 +235,7 @@
return tableShape;
}
- private void createConnections(ExtendedShape persistentClass, ExtendedShape
databaseTable){
+ private void createConnections(ExpandeableShape persistentClass, ExpandeableShape
databaseTable){
int i = 0;
boolean check = (persistentClass.getOrmElement() instanceof SpecialRootClass);
Iterator persistentFields = persistentClass.getChildren().iterator();
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/OrmShape.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/OrmShape.java 2007-06-29
13:38:16 UTC (rev 2217)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/OrmShape.java 2007-06-29
13:57:39 UTC (rev 2218)
@@ -26,7 +26,7 @@
* @author Konstantin Mishin
*
*/
-public class OrmShape extends ExtendedShape {
+public class OrmShape extends ExpandeableShape {
public static final String SET_HIDEN = "set hiden";
public static final String LOCATION_PROP = "OrmShape.Location";
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ComponentShapeEditPart.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ComponentShapeEditPart.java 2007-06-29
13:38:16 UTC (rev 2217)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ComponentShapeEditPart.java 2007-06-29
13:57:39 UTC (rev 2218)
@@ -29,13 +29,12 @@
import org.jboss.tools.hibernate.veditor.editors.figures.TitleFigure;
import org.jboss.tools.hibernate.veditor.editors.figures.TitleLabel;
import org.jboss.tools.hibernate.veditor.editors.model.ComponentShape;
-import org.jboss.tools.hibernate.veditor.editors.model.ExtendedShape;
import org.jboss.tools.hibernate.veditor.editors.model.OrmDiagram;
import org.jboss.tools.hibernate.veditor.editors.model.OrmShape;
import org.jboss.tools.hibernate.veditor.editors.model.Shape;
-public class ComponentShapeEditPart extends ExtendedShapeEditPart {
+public class ComponentShapeEditPart extends ExpandeableShapeEditPart {
protected IFigure createFigure() {
if (getModel() instanceof ComponentShape) {
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ExpandeableShapeEditPart.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ExpandeableShapeEditPart.java 2007-06-29
13:38:16 UTC (rev 2217)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ExpandeableShapeEditPart.java 2007-06-29
13:57:39 UTC (rev 2218)
@@ -28,7 +28,6 @@
import org.jboss.tools.hibernate.veditor.editors.model.ComponentShape;
import org.jboss.tools.hibernate.veditor.editors.model.Connection;
import org.jboss.tools.hibernate.veditor.editors.model.ExpandeableShape;
-import org.jboss.tools.hibernate.veditor.editors.model.ExtendedShape;
import org.jboss.tools.hibernate.veditor.editors.model.OrmShape;
import org.jboss.tools.hibernate.veditor.editors.model.Shape;
@@ -43,7 +42,13 @@
public void propertyChange(PropertyChangeEvent evt) {
String prop = evt.getPropertyName();
- if (ExpandeableShape.SHOW_REFERENCES.equals(prop)) {
+ if (Shape.SHOW_SELECTION.equals(prop)) {
+ ((IFigure)getFigure().getChildren().get(0)).setBackgroundColor(getSelectionColor());
+ ((IFigure)getFigure().getChildren().get(0)).setForegroundColor(ResourceManager.getInstance().getColor(new
RGB(255,255,255)));
+ } else if (Shape.HIDE_SELECTION.equals(prop)) {
+ ((IFigure)getFigure().getChildren().get(0)).setBackgroundColor(getColor());
+ ((IFigure)getFigure().getChildren().get(0)).setForegroundColor(ResourceManager.getInstance().getColor(new
RGB(0,0,0)));
+ }else if (ExpandeableShape.SHOW_REFERENCES.equals(prop)) {
// ((IFigure)getFigure().getChildren().get(0)).setBackgroundColor(getSelectionColor());
// ((IFigure)getFigure().getChildren().get(0)).setForegroundColor(ResourceManager.getInstance().getColor(new
RGB(255,255,255)));
} else {
@@ -51,4 +56,7 @@
}
}
+ protected List getModelChildren() {
+ return ((ExpandeableShape)getModel()).getChildren();
+ }
}
Deleted:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ExtendedShapeEditPart.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ExtendedShapeEditPart.java 2007-06-29
13:38:16 UTC (rev 2217)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ExtendedShapeEditPart.java 2007-06-29
13:57:39 UTC (rev 2218)
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.parts;
-
-import java.beans.PropertyChangeEvent;
-import java.util.List;
-
-import org.eclipse.draw2d.FocusBorder;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.MarginBorder;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.ToolbarLayout;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.RequestConstants;
-import org.eclipse.swt.graphics.RGB;
-import org.jboss.tools.hibernate.veditor.editors.figures.TitleFigure;
-import org.jboss.tools.hibernate.veditor.editors.figures.TitleLabel;
-import org.jboss.tools.hibernate.veditor.editors.model.ComponentShape;
-import org.jboss.tools.hibernate.veditor.editors.model.ExtendedShape;
-import org.jboss.tools.hibernate.veditor.editors.model.OrmShape;
-import org.jboss.tools.hibernate.veditor.editors.model.Shape;
-
-
-public class ExtendedShapeEditPart extends ExpandeableShapeEditPart {
-
- public void propertyChange(PropertyChangeEvent evt) {
- String prop = evt.getPropertyName();
- if (Shape.SHOW_SELECTION.equals(prop)) {
- ((IFigure)getFigure().getChildren().get(0)).setBackgroundColor(getSelectionColor());
- ((IFigure)getFigure().getChildren().get(0)).setForegroundColor(ResourceManager.getInstance().getColor(new
RGB(255,255,255)));
- } else if (Shape.HIDE_SELECTION.equals(prop)) {
- ((IFigure)getFigure().getChildren().get(0)).setBackgroundColor(getColor());
- ((IFigure)getFigure().getChildren().get(0)).setForegroundColor(ResourceManager.getInstance().getColor(new
RGB(0,0,0)));
- } else {
- super.propertyChange(evt);
- }
- }
-
- protected List getModelChildren() {
- return ((ExtendedShape)getModel()).getChildren();
- }
-}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/OrmEditPartFactory.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/OrmEditPartFactory.java 2007-06-29
13:38:16 UTC (rev 2217)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/OrmEditPartFactory.java 2007-06-29
13:57:39 UTC (rev 2218)
@@ -15,7 +15,6 @@
import org.jboss.tools.hibernate.veditor.editors.model.ComponentShape;
import org.jboss.tools.hibernate.veditor.editors.model.Connection;
import org.jboss.tools.hibernate.veditor.editors.model.ExpandeableShape;
-import org.jboss.tools.hibernate.veditor.editors.model.ExtendedShape;
import org.jboss.tools.hibernate.veditor.editors.model.OrmDiagram;
import org.jboss.tools.hibernate.veditor.editors.model.OrmShape;
import org.jboss.tools.hibernate.veditor.editors.model.Shape;
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/OrmShapeEditPart.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/OrmShapeEditPart.java 2007-06-29
13:38:16 UTC (rev 2217)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/OrmShapeEditPart.java 2007-06-29
13:57:39 UTC (rev 2218)
@@ -36,7 +36,6 @@
import org.jboss.tools.hibernate.veditor.editors.figures.TitleFigure;
import org.jboss.tools.hibernate.veditor.editors.figures.TitleLabel;
import org.jboss.tools.hibernate.veditor.editors.model.ExpandeableShape;
-import org.jboss.tools.hibernate.veditor.editors.model.ExtendedShape;
import org.jboss.tools.hibernate.veditor.editors.model.OrmDiagram;
import org.jboss.tools.hibernate.veditor.editors.model.OrmShape;
@@ -45,7 +44,7 @@
* @author Konstantin Mishin
*
*/
-public class OrmShapeEditPart extends ExtendedShapeEditPart{
+public class OrmShapeEditPart extends ExpandeableShapeEditPart{
protected IFigure createFigure() {
if (getModel() instanceof OrmShape) {
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ShapeEditPart.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ShapeEditPart.java 2007-06-29
13:38:16 UTC (rev 2217)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ShapeEditPart.java 2007-06-29
13:57:39 UTC (rev 2218)
@@ -92,6 +92,7 @@
getViewer().select(this);
getViewer().reveal(this);
}
+ refresh();
}
public void performRequest(Request req) {