From 19fcbcb74da81300aa7a212ad1163cddcbf5e029 Mon Sep 17 00:00:00 2001 From: David Trachtenherz <trachtenherz@fortiss.org> Date: Wed, 4 Jan 2012 14:35:45 +0000 Subject: [PATCH] refs 451 --- .../ui/extension/base/MenuActionBase.java | 62 ------------------- 1 file changed, 62 deletions(-) delete mode 100644 org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/extension/base/MenuActionBase.java diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/extension/base/MenuActionBase.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/extension/base/MenuActionBase.java deleted file mode 100644 index 54eafff98..000000000 --- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/extension/base/MenuActionBase.java +++ /dev/null @@ -1,62 +0,0 @@ -/*--------------------------------------------------------------------------+ -$Id: EasyStartMenuBase.java 1907 2011-11-11 14:04:26Z hoelzl $ -| | -| Copyright 2011 ForTISS GmbH | -| | -| Licensed under the Apache License, Version 2.0 (the "License"); | -| you may not use this file except in compliance with the License. | -| You may obtain a copy of the License at | -| | -| http://www.apache.org/licenses/LICENSE-2.0 | -| | -| Unless required by applicable law or agreed to in writing, software | -| distributed under the License is distributed on an "AS IS" BASIS, | -| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | -| See the License for the specific language governing permissions and | -| limitations under the License. | -+--------------------------------------------------------------------------*/ -package org.fortiss.tooling.kernel.ui.extension.base; - -import org.eclipse.jface.action.Action; -import org.eclipse.jface.resource.ImageDescriptor; - -/** - * Base class for menu actions. - * - * @author trachtenherz - * @author $Author: hoelzl $ - * @version $Rev: 1907 $ - * @ConQAT.Rating YELLOW Hash: CD9CF8D6200B156E8C0EE759A512A76E - */ -// TODO @review: this class looks very similar to EObjectActionBase; why do we -// need it? -// TODO @review: what is <T>; document generic parameters in class comment. -public abstract class MenuActionBase<T> extends Action { - - /** Factory for the action instances used for this menu */ - // TODO @review: why this interface? Why not - // org.eclipse.ui.actions.ActionFactory? - public static interface ActionFactory<T> { - /** Creates and returns an action instance for the given target. */ - MenuActionBase<T> createAction(T target); - } - - /** The target to be processed. */ - protected final T target; - - // TODO @review: why these methods? there are constructors. - /** Name of the action. */ - protected abstract String getActionName(); - - /** Icon for the action. */ - protected ImageDescriptor getActionIcon() { - return null; - } - - /** Constructor. */ - public MenuActionBase(T target) { - setText(getActionName()); - setImageDescriptor(getActionIcon()); - this.target = target; - } -} -- GitLab