return AjdeManager.build(projectName,configFile);
}
+ public boolean fullBuild(String projectName,String configFile) {
+ return AjdeManager.fullBuild(projectName,configFile);
+ }
+
/** Looks after communicating with the singleton Ajde instance */
public static class AjdeManager {
return true;
}
+ private static boolean fullBuild(String projectName,String configFile) {
+ pause(1000); // delay to allow previous runs build stamps to be OK
+ lognoln("Building project '"+projectName+"'");
+
+ // Ajde.getDefault().enableLogging(System.out);
+
+ //Ajde.getDefault().getBuildManager().setReportInfoMessages(true);
+
+ // Configure the necessary providers and listeners for this compile
+ MyBuildProgressMonitor.reset();
+ MyTaskListManager.reset();
+ MyStateListener.reset();
+
+ MyProjectPropertiesAdapter.setActiveProject(projectName);
+ //AsmManager.attemptIncrementalModelRepairs=true;
+ //IncrementalStateManager.recordIncrementalStates=true;
+
+ Ajde.getDefault().getBuildManager().setBuildModelMode(buildModel);
+
+ // Do the compile
+ Ajde.getDefault().getBuildManager().buildFresh(getFile(projectName,configFile));
+
+ // Wait for it to complete
+ while (!MyBuildProgressMonitor.hasFinished()) {
+ lognoln(".");
+ pause(100);
+ }
+ log("");
+
+ // What happened?
+ if (MyTaskListManager.hasErrorMessages()) {
+ System.err.println("Build errors:");
+ for (Iterator iter = MyTaskListManager.getErrorMessages().iterator(); iter.hasNext();) {
+ IMessage element = (IMessage) iter.next();
+ System.err.println(element);
+ }
+ System.err.println("---------");
+ }
+ log("Build finished, time taken = "+MyBuildProgressMonitor.getTimeTaken()+"ms");
+ return true;
+ }
+
private static void pause(int millis) {
try {
Thread.sleep(millis);
}
public Map getJavaOptionsMap() {
- return null;
+ Hashtable ht = new Hashtable();
+ ht.put("org.eclipse.jdt.core.compiler.compliance","1.5");
+ ht.put("org.eclipse.jdt.core.compiler.codegen.targetPlatform","1.5");
+ return ht;
}
public boolean getUseJavacMode() {
checkWasntFullBuild();
}
+ public void testPr117882() {
+// AjdeInteractionTestbed.VERBOSE=true;
+// AjdeInteractionTestbed.configureBuildStructureModel(true);
+ initialiseProject("PR117882");
+ build("PR117882");
+ checkWasFullBuild();
+ alter("PR117882","inc1");
+ build("PR117882");
+ checkWasntFullBuild();
+// AjdeInteractionTestbed.VERBOSE=false;
+// AjdeInteractionTestbed.configureBuildStructureModel(false);
+ }
+
+ public void testPr117882_2() {
+// AjdeInteractionTestbed.VERBOSE=true;
+// AjdeInteractionTestbed.configureBuildStructureModel(true);
+ initialiseProject("PR117882_2");
+ build("PR117882_2");
+ checkWasFullBuild();
+ alter("PR117882_2","inc1");
+ build("PR117882_2");
+ checkWasntFullBuild();
+ checkCompileWeaveCount(1,4);
+ //fullBuild("PR117882_2");
+ //checkWasFullBuild();
+// AjdeInteractionTestbed.VERBOSE=false;
+// AjdeInteractionTestbed.configureBuildStructureModel(false);
+ }
+
public void testPr115251() {
//AjdeInteractionTestbed.VERBOSE=true;
initialiseProject("PR115251");
if (AjdeInteractionTestbed.VERBOSE) printBuildReport();
}
-
+ public void fullBuild(String projectName) {
+ constructUpToDateLstFile(projectName,"build.lst");
+ fullBuild(projectName,"build.lst");
+ if (AjdeInteractionTestbed.VERBOSE) printBuildReport();
+ }
private void constructUpToDateLstFile(String pname,String configname) {
File projectBase = new File(sandboxDir,pname);