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