1 19 20 package ca.mcgill.sable.soot.launching; 21 22 import java.util.*; 23 24 import org.eclipse.jdt.core.*; 25 import org.eclipse.jface.action.*; 26 27 30 public class SootProjectLauncher extends SootLauncher { 31 32 private String process_path; 33 private ArrayList javaProcessPath; 34 private String classpathAppend = null; 35 36 public void run(IAction action) { 37 super.run(action); 38 classpathAppend = null; 39 try { 40 setProcess_path(platform_location+getSootSelection().getJavaProject().getOutputLocation().toOSString()); 41 IPackageFragmentRoot [] roots = getSootSelection().getJavaProject().getAllPackageFragmentRoots(); 42 43 for (int i = 0; i < roots.length; i++){ 44 if (!roots[i].isArchive() && roots[i].getKind() == IPackageFragmentRoot.K_SOURCE){ 45 46 String next = platform_location+roots[i].getPath(); 47 48 if (getJavaProcessPath() == null){ 49 setJavaProcessPath(new ArrayList()); 50 } 51 52 getJavaProcessPath().add(next); 53 } 54 } 55 56 addJars(); 57 } 58 catch(Exception e1) { 59 System.out.println(e1.getMessage()); 60 } 61 } 62 63 67 public void setClasspathAppend(String ca) { 68 if (this.classpathAppend == null){ 69 this.classpathAppend = ca; 70 } 71 else { 72 this.classpathAppend = this.classpathAppend+getSootClasspath().getSeparator()+ca; 73 } 74 } 75 76 77 81 public String getProcess_path() { 82 return process_path; 83 } 84 85 86 90 public void setProcess_path(String process_path) { 91 this.process_path = process_path; 92 } 93 94 97 public String getClasspathAppend() { 98 return classpathAppend; 99 } 100 101 104 public ArrayList getJavaProcessPath() { 105 return javaProcessPath; 106 } 107 108 111 public void setJavaProcessPath(ArrayList list) { 112 javaProcessPath = list; 113 } 114 115 } 116 | Popular Tags |