1 19 20 package ca.mcgill.sable.soot.launching; 21 22 import java.util.ArrayList ; 23 import java.util.Iterator ; 24 25 import org.eclipse.jface.action.IAction; 26 27 30 public class SootGrimpFromJavaFileLauncher extends SootFileLauncher { 31 32 public void run(IAction action) { 33 super.run(action); 34 super.setIsSrcPrec(true); 35 super.setSrcPrec(LaunchCommands.JAVA_IN); 36 super.handleMultipleFiles(); 37 38 if (isDoNotContinue()) return; 39 setCmd(); 40 runSootDirectly(); 41 runFinish(); 42 43 } 44 45 private void setCmd() { 46 ArrayList commands = new ArrayList (); 47 commands.add("--"+LaunchCommands.SOOT_CLASSPATH); 48 commands.add(getClasspathAppend()); 49 commands.add("--"+LaunchCommands.OUTPUT_DIR); 50 commands.add(getOutputLocation()); 51 getSootCommandList().addSingleOpt("--"+LaunchCommands.KEEP_LINE_NUMBER); 52 getSootCommandList().addSingleOpt("--"+LaunchCommands.XML_ATTRIBUTES); 53 getSootCommandList().addDoubleOpt("--"+LaunchCommands.OUTPUT, LaunchCommands.GRIMP_OUT); 54 55 56 if (isExtraCmd()) { 57 getSootCommandList().addSingleOpt("--"+getExtraCmd()); 58 } 59 if (isSrcPrec()) { 60 getSootCommandList().addDoubleOpt("--"+LaunchCommands.SRC_PREC, getSrcPrec()); 61 } 62 Iterator it = getToProcessList().iterator(); 63 while (it.hasNext()){ 64 commands.add((String )it.next()); 65 } 66 getSootCommandList().addSingleOpt(commands); 67 } 68 } 69 | Popular Tags |