01: /* Soot - a J*va Optimization Framework
02: * Copyright (C) 2005 Jennifer Lhotak
03: *
04: * This library is free software; you can redistribute it and/or
05: * modify it under the terms of the GNU Lesser General Public
06: * License as published by the Free Software Foundation; either
07: * version 2.1 of the License, or (at your option) any later version.
08: *
09: * This library is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12: * Lesser General Public License for more details.
13: *
14: * You should have received a copy of the GNU Lesser General Public
15: * License along with this library; if not, write to the
16: * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17: * Boston, MA 02111-1307, USA.
18: */
19:
20: package ca.mcgill.sable.graph.actions;
21:
22: import org.eclipse.gef.ui.actions.SelectionAction;
23: import org.eclipse.ui.IEditorPart;
24: import org.eclipse.ui.IWorkbenchPart;
25:
26: public class SimpleSelectAction extends SelectionAction {
27:
28: private final static String SIMPLE_SELECT = "simple select";
29: private IWorkbenchPart part;
30:
31: /**
32: * @param part
33: */
34: public SimpleSelectAction(IWorkbenchPart part) {
35: super (part);
36: }
37:
38: /* (non-Javadoc)
39: * @see org.eclipse.gef.ui.actions.WorkbenchPartAction#calculateEnabled()
40: */
41: protected boolean calculateEnabled() {
42: return true;
43: }
44:
45: public void run() {
46: }
47:
48: /**
49: * @return
50: */
51: public IWorkbenchPart getPart() {
52: return part;
53: }
54:
55: /**
56: * @param part
57: */
58: public void setPart(IWorkbenchPart part) {
59: this .part = part;
60: }
61:
62: protected void init() {
63: super.init();
64: setId(SIMPLE_SELECT);
65: }
66:
67: }
|