Search in sources :

Example 1 with ConnectableEditPart

use of org.eclipse.wst.xsd.ui.internal.design.editparts.ConnectableEditPart in project webtools.sourceediting by eclipse.

the class BaseDragAndDropCommand method handleOtherTargets.

protected void handleOtherTargets(int index) {
    int in = 0;
    ConnectableEditPart previousModelEditPart = null;
    for (Iterator i = targetSpacesList.iterator(); i.hasNext(); ) {
        Object o = i.next();
        previousModelEditPart = parentEditPart;
        TargetConnectionSpacingFigureEditPart sp = (TargetConnectionSpacingFigureEditPart) o;
        if (sp.getParent() instanceof ConnectableEditPart)
            parentEditPart = (ConnectableEditPart) sp.getParent();
        else
            parentEditPart = null;
        in++;
        if (in > index) {
            if (closerSibling == ABOVE_IS_CLOSER) {
                parentEditPart = previousModelEditPart;
            }
            break;
        }
    }
}
Also used : ConnectableEditPart(org.eclipse.wst.xsd.ui.internal.design.editparts.ConnectableEditPart) Iterator(java.util.Iterator) TargetConnectionSpacingFigureEditPart(org.eclipse.wst.xsd.ui.internal.design.editparts.TargetConnectionSpacingFigureEditPart) Point(org.eclipse.draw2d.geometry.Point)

Aggregations

Iterator (java.util.Iterator)1 Point (org.eclipse.draw2d.geometry.Point)1 ConnectableEditPart (org.eclipse.wst.xsd.ui.internal.design.editparts.ConnectableEditPart)1 TargetConnectionSpacingFigureEditPart (org.eclipse.wst.xsd.ui.internal.design.editparts.TargetConnectionSpacingFigureEditPart)1