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.soot.callgraph;
21:
22: import org.eclipse.gef.ui.actions.EditorPartAction;
23:
24: import org.eclipse.ui.IEditorPart;
25: import org.eclipse.jface.resource.*;
26: import org.eclipse.ui.*;
27: import org.eclipse.jface.action.*;
28: import org.eclipse.jface.viewers.*;
29:
30: import org.eclipse.swt.printing.*;
31:
32: import soot.toolkits.graph.interaction.InteractionHandler;
33:
34: import org.eclipse.ui.IEditorPart;
35:
36: import soot.toolkits.graph.interaction.InteractionHandler;
37:
38: import ca.mcgill.sable.soot.SootPlugin;
39:
40: import org.eclipse.ui.*;
41:
42: public class CollapseAllAction implements IEditorActionDelegate {
43:
44: public static final String COLLAPSE_ALL = "collapse all";
45:
46: /* (non-Javadoc)
47: * @see org.eclipse.gef.ui.actions.WorkbenchPartAction#calculateEnabled()
48: */
49: protected boolean calculateEnabled() {
50: return true;
51: }
52:
53: public CollapseAllAction() {
54: }
55:
56: public void run(IAction action) {
57: InteractionHandler.v().setCgReset(true);
58: InteractionHandler.v().setInteractionCon();
59:
60: }
61:
62: public void setActiveEditor(IAction action, IEditorPart part) {
63: }
64:
65: protected void init() {
66: }
67:
68: public void selectionChanged(IAction action, ISelection sel) {
69: }
70:
71: }
|