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.*; 26 27 31 public class SootJimpleJavaProjectLauncher extends SootProjectLauncher { 32 33 34 public void run(IAction action) { 35 36 super.run(action); 37 setCmd(); 38 runSootDirectly(); 39 runFinish(); 40 } 41 42 private void setCmd() { 43 ArrayList commands = new ArrayList (); 44 commands.add("--"+LaunchCommands.SOOT_CLASSPATH); 45 46 Iterator it = getJavaProcessPath().iterator(); 47 String cp = (String )it.next(); 48 while (it.hasNext()){ 49 cp = cp + getSootClasspath().getSeparator() + (String )it.next(); 50 } 51 cp = cp + getSootClasspath().getSeparator() + getClasspathAppend(); 52 commands.add(cp); 53 commands.add("--"+LaunchCommands.OUTPUT_DIR); 54 commands.add(getOutputLocation()); 55 getSootCommandList().addSingleOpt("--"+LaunchCommands.KEEP_LINE_NUMBER); 56 getSootCommandList().addSingleOpt("--"+LaunchCommands.XML_ATTRIBUTES); 57 Iterator it2 = getJavaProcessPath().iterator(); 58 while (it2.hasNext()){ 59 commands.add("--"+LaunchCommands.PROCESS_PATH); 60 commands.add((String )it2.next()); 61 } 62 getSootCommandList().addDoubleOpt("--"+LaunchCommands.OUTPUT, LaunchCommands.JIMPLE_OUT); 63 getSootCommandList().addDoubleOpt("--"+LaunchCommands.SRC_PREC,"java"); 64 getSootCommandList().addSingleOpt(commands); 65 66 } 67 68 } 69 | Popular Tags |