Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/ComplexTypeEditPart.java')
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/ComplexTypeEditPart.java84
1 files changed, 0 insertions, 84 deletions
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/ComplexTypeEditPart.java b/bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/ComplexTypeEditPart.java
deleted file mode 100644
index 0ff12cf46f..0000000000
--- a/bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/ComplexTypeEditPart.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsd.ui.internal.adt.design.editparts;
-
-import java.util.Iterator;
-
-import org.eclipse.draw2d.ManhattanConnectionRouter;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.editparts.AbstractGraphicalEditPart;
-import org.eclipse.wst.xsd.ui.internal.adt.design.editparts.model.FocusTypeColumn;
-import org.eclipse.wst.xsd.ui.internal.adt.facade.IComplexType;
-import org.eclipse.wst.xsd.ui.internal.adt.facade.IType;
-
-public class ComplexTypeEditPart extends StructureEditPart
-{
- protected boolean shouldDrawConnection()
- {
- if (getParent().getModel() instanceof FocusTypeColumn)
- {
- IComplexType complexType = (IComplexType)getModel();
- return complexType.getSuperType() != null;
- }
- return false;
- }
-
-
- private EditPart getTargetEditPart(IType type)
- {
- ColumnEditPart columnEditPart = null;
- for (EditPart editPart = this; editPart != null; editPart = editPart.getParent())
- {
- if (editPart instanceof ColumnEditPart)
- {
- columnEditPart = (ColumnEditPart)editPart;
- break;
- }
- }
- if (columnEditPart != null)
- {
- for (Iterator i = columnEditPart.getChildren().iterator(); i.hasNext(); )
- {
- EditPart child = (EditPart)i.next();
- if (child.getModel() == type)
- {
- return child;
- }
- }
- }
- return null;
- }
-
- public TypeReferenceConnection createConnectionFigure()
- {
- connectionFigure = null;
- IComplexType complexType = (IComplexType)getModel();
- IType type = complexType.getSuperType();
- if (type != null)
- {
- AbstractGraphicalEditPart referenceTypePart = (AbstractGraphicalEditPart)getTargetEditPart(type);
- if (referenceTypePart != null)
- {
- connectionFigure = new TypeReferenceConnection(true);
- // draw a line out from the top
- connectionFigure.setSourceAnchor(new CenteredConnectionAnchor(getFigure(), CenteredConnectionAnchor.TOP, 1));
-
- // TODO (cs) need to draw the target anchor to look like a UML inheritance relationship
- // adding a label to the connection would help to
- connectionFigure.setTargetAnchor(new CenteredConnectionAnchor(referenceTypePart.getFigure(), CenteredConnectionAnchor.BOTTOM, 0, 0));
- connectionFigure.setConnectionRouter(new ManhattanConnectionRouter());
- ((CenteredConnectionAnchor)connectionFigure.getSourceAnchor()).setOther((CenteredConnectionAnchor)connectionFigure.getTargetAnchor());
- connectionFigure.setHighlight(false);
- }
- }
- return connectionFigure;
- }
-} \ No newline at end of file

Back to the top