diff options
Diffstat (limited to 'jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/actions/single/SelectEditPartAction.java')
-rw-r--r-- | jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/actions/single/SelectEditPartAction.java | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/actions/single/SelectEditPartAction.java b/jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/actions/single/SelectEditPartAction.java deleted file mode 100644 index 2cb229902..000000000 --- a/jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/actions/single/SelectEditPartAction.java +++ /dev/null @@ -1,61 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 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.pagedesigner.actions.single; - -import org.eclipse.gef.EditPart; -import org.eclipse.jface.action.Action; -import org.eclipse.jface.viewers.StructuredSelection; - -/** - * @author mengbo - * @version 1.5 - */ -public abstract class SelectEditPartAction extends Action { - - /** - * @param text - * @param forThisPart - * @return a convience object when the edit part that needs selection - * is already known when the action is constructed - */ - public static SelectEditPartAction create(final String text, final EditPart forThisPart) - { - return new SelectEditPartAction(text) - { - protected EditPart getNewSelection() { - return forThisPart; - } - }; - } - - /** - * @param text - */ - protected SelectEditPartAction(String text) { - super(text); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jface.action.Action#run() - */ - public void run() { - final EditPart newSelection = getNewSelection(); - newSelection.getViewer().setSelection(new StructuredSelection(newSelection)); - } - - /** - * @return the EditPart onto which selection should be applied. - */ - protected abstract EditPart getNewSelection(); -} |