1 19 20 package ca.mcgill.sable.soot.cfg; 21 22 import org.eclipse.jface.action.*; 23 import org.eclipse.jface.resource.ImageDescriptor; 24 import org.eclipse.ui.*; 25 import org.eclipse.gef.ui.actions.*; 26 27 import com.sun.rsasign.t; 28 29 import ca.mcgill.sable.graph.actions.*; 30 import ca.mcgill.sable.soot.cfg.editParts.*; 31 32 33 public class StopAction extends SimpleSelectAction { 34 35 public static final String STOP = "mark stop action"; 36 37 38 public StopAction(IWorkbenchPart part) { 39 super(part); 40 } 41 42 43 44 45 protected void init(){ 46 super.init(); 47 setId(STOP); 48 setText("Add Breakpoint"); 49 } 50 51 public void run(){ 52 if (!getSelectedObjects().isEmpty() && (getSelectedObjects().get(0) instanceof NodeDataEditPart)){ 53 NodeDataEditPart cfgPart = (NodeDataEditPart)getSelectedObjects().get(0); 54 cfgPart.markStop(); 55 } 56 } 57 58 public boolean calculateEnabled(){ 59 return true; 60 } 61 } 62 | Popular Tags |