1 19 20 21 package ca.mcgill.sable.soot.cfg.actions; 22 23 import org.eclipse.gef.ui.actions.EditorPartAction; 24 import org.eclipse.ui.IEditorPart; 25 import ca.mcgill.sable.soot.*; 26 import soot.toolkits.graph.interaction.*; 27 import org.eclipse.jface.resource.*; 28 29 30 public class NextMethodAction extends EditorPartAction { 31 32 public static final String NEXT_METHOD = "next method"; 33 36 public NextMethodAction(IEditorPart editor) { 37 super(editor); 38 setImageDescriptor(SootPlugin.getImageDescriptor("next_method.gif")); 39 setToolTipText("Next Method"); 40 } 41 42 43 46 protected boolean calculateEnabled() { 47 return true; 48 } 49 50 56 public void run(){ 57 if (InteractionHandler.v().doneCurrent()){ 58 InteractionHandler.v().setInteractionCon(); 59 } 60 } 61 62 public void setEditorPart(IEditorPart part){ 63 super.setEditorPart(part); 64 } 65 66 protected void init() { 67 super.init(); 68 setId( NEXT_METHOD ); 69 } 70 } 71 | Popular Tags |