diff options
Diffstat (limited to 'bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/EditPartNavigationHandlerUtil.java')
-rw-r--r-- | bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/EditPartNavigationHandlerUtil.java | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/EditPartNavigationHandlerUtil.java b/bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/EditPartNavigationHandlerUtil.java deleted file mode 100644 index c234b65f5c..0000000000 --- a/bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/EditPartNavigationHandlerUtil.java +++ /dev/null @@ -1,72 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2006 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.List; -import org.eclipse.gef.EditPart; - - -public class EditPartNavigationHandlerUtil -{ - public static EditPart getFirstChild(EditPart editPart) - { - EditPart result = null; - if (editPart.getChildren().size() > 0) - { - result = (EditPart)editPart.getChildren().get(0); - } - return result; - } - - public static EditPart getLastChild(EditPart editPart) - { - EditPart result = null; - int size = editPart.getChildren().size(); - if (size > 0) - { - result = (EditPart)editPart.getChildren().get(size - 1); - } - return result; - } - - public static EditPart getNextSibling(EditPart editPart) - { - EditPart result = null; - EditPart parent = editPart.getParent(); - if (parent != null) - { - List children = parent.getChildren(); - int index = children.indexOf(editPart); - if (index + 1 < children.size()) - { - result = (EditPart)children.get(index + 1); - } - } - return result; - } - - public static EditPart getPrevSibling(EditPart editPart) - { - EditPart result = null; - EditPart parent = editPart.getParent(); - if (parent != null) - { - List children = parent.getChildren(); - int index = children.indexOf(editPart); - if (index - 1 >= 0) - { - // if this is the first child - // - result = (EditPart)children.get(index - 1); - } - } - return result; - } -} |