1 19 20 package ca.mcgill.sable.soot.cfg.actions; 21 22 import org.eclipse.gef.ui.actions.EditorPartAction; 23 import org.eclipse.ui.IEditorPart; 24 import ca.mcgill.sable.soot.*; 25 import soot.toolkits.graph.interaction.*; 26 import org.eclipse.jface.resource.*; 27 28 29 public class StepBackwardAction extends EditorPartAction { 30 31 public static final String STEP_BACKWARD = "step backward"; 32 35 public StepBackwardAction(IEditorPart editor) { 36 super(editor); 37 setImageDescriptor(SootPlugin.getImageDescriptor("resume_co_back.gif")); 38 setToolTipText("Step Backward"); 39 } 40 41 42 45 protected boolean calculateEnabled() { 46 return true; 47 } 48 49 54 public void run(){ 55 SootPlugin.getDefault().getDataKeeper().stepBack(); 56 57 } 58 59 public void setEditorPart(IEditorPart part){ 60 super.setEditorPart(part); 61 } 62 63 protected void init() { 64 super.init(); 65 setId( STEP_BACKWARD ); 66 } 67 } 68 | Popular Tags |