diff options
Diffstat (limited to 'jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/editpolicy/PageflowContainerEditPolicy.java')
-rw-r--r-- | jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/editpolicy/PageflowContainerEditPolicy.java | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/editpolicy/PageflowContainerEditPolicy.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/editpolicy/PageflowContainerEditPolicy.java deleted file mode 100644 index f392f25a6..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/editpolicy/PageflowContainerEditPolicy.java +++ /dev/null @@ -1,62 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2005 Sybase, Inc. 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: - * Sybase, Inc. - initial API and implementation - *******************************************************************************/ - -package org.eclipse.jst.jsf.facesconfig.ui.pageflow.editpolicy; - -import java.util.List; - -import org.eclipse.gef.EditPart; -import org.eclipse.gef.commands.Command; -import org.eclipse.gef.commands.CompoundCommand; -import org.eclipse.gef.editpolicies.ContainerEditPolicy; -import org.eclipse.gef.requests.CreateRequest; -import org.eclipse.gef.requests.GroupRequest; -import org.eclipse.jst.jsf.facesconfig.ui.pageflow.PageflowMessages; -import org.eclipse.jst.jsf.facesconfig.ui.pageflow.command.OrphanChildCommand; -import org.eclipse.jst.jsf.facesconfig.ui.pageflow.model.Pageflow; -import org.eclipse.jst.jsf.facesconfig.ui.pageflow.model.PageflowNode; - -/** - * Customize the container policy for page flow containers - * - */ -public class PageflowContainerEditPolicy extends ContainerEditPolicy { - /* - * (non-Javadoc) - * - * @see ContainerEditPolicy#getCreateCommand() - */ - protected Command getCreateCommand(CreateRequest request) { - return null; - } - - /* - * (non-Javadoc) - * - * @see ContainerEditPolicy#getOrphanChildrenCommand() - */ - public Command getOrphanChildrenCommand(GroupRequest request) { - List parts = request.getEditParts(); - CompoundCommand result = new CompoundCommand("orphanchildcommand"); //$NON-NLS-1$ - for (int i = 0; i < parts.size(); i++) { - OrphanChildCommand orphan = new OrphanChildCommand(); - orphan - .setChild((PageflowNode) ((EditPart) parts.get(i)) - .getModel()); - orphan.setParent((Pageflow) getHost().getModel()); - orphan.setLabel(PageflowMessages.PageflowContainerEditPolicy_OrphanLabel); - result.add(orphan); - } - return result.unwrap(); - } - -} |