Browse Source

pr145689 - telling AJDT through the progress monitor (rather than a debug interface) whether the build was full or incremental.

tags/PRE_PIPELINE
aclement 18 years ago
parent
commit
beaeab3dbf

+ 1
- 1
ajde/src/org/aspectj/ajde/BuildProgressMonitor.java View File

@@ -61,5 +61,5 @@ public interface BuildProgressMonitor {
/**
* Jump the progress bar to the end and finish progress monitoring.
*/
public void finish();
public void finish(boolean wasFullBuild);
}

+ 1
- 1
ajde/src/org/aspectj/ajde/internal/AspectJBuildManager.java View File

@@ -202,7 +202,7 @@ public class AspectJBuildManager implements BuildManager {
Ajde.getDefault().getErrorHandler().handleError("Compile error, caught Throwable: " + e.toString(), e);
} finally {
warnings = compilerMessages.hasWarning();
progressMonitor.finish();
progressMonitor.finish(compilerAdapter.wasFullBuild());
}
notifyCompileFinished(configFile, lastCompileTime, succeeded, warnings);
}

+ 4
- 0
ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java View File

@@ -646,4 +646,8 @@ public class CompilerAdapter {
buildManager.setState(buildState);
buildManager.setStructureModel(buildState.getStructureModel());
}

public boolean wasFullBuild() {
return buildManager.wasFullBuild();
}
}

+ 1
- 1
ajde/src/org/aspectj/ajde/ui/swing/DefaultBuildProgressMonitor.java View File

@@ -92,7 +92,7 @@ public class DefaultBuildProgressMonitor extends Thread implements BuildProgress
/**
* Jump the progress bar to the end and finish progress monitoring.
*/
public void finish() {
public void finish(boolean wasFullBuild) {
progressDialog.finish();
dialog.dispose();
}

+ 1
- 1
ajde/testsrc/org/aspectj/ajde/BuildCancellingTest.java View File

@@ -345,7 +345,7 @@ public class BuildCancellingTest extends AjdeTestCase {
return 100; // Causes setProgressBarVal() to be fed what are effectively percentages
}

public void finish() {
public void finish(boolean b) {
}

}

+ 1
- 1
ajde/testsrc/org/aspectj/ajde/NullIdeProgressMonitor.java View File

@@ -38,7 +38,7 @@ public class NullIdeProgressMonitor implements BuildProgressMonitor {
return 0;
}

public void finish() {
public void finish(boolean b) {

}


+ 1
- 1
ajde/testsrc/org/aspectj/ajde/ReweavableTestCase.java View File

@@ -406,7 +406,7 @@ public class ReweavableTestCase extends AjdeTestCase {
return 0;
}

public void finish() {}
public void finish(boolean b) {}
}

+ 1
- 1
ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java View File

@@ -320,7 +320,7 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
return 0;
}

public void finish() {}
public void finish(boolean b) {}
}

+ 6
- 2
testing/src/org/aspectj/testing/ajde/CompileCommand.java View File

@@ -114,8 +114,8 @@ public class CompileCommand implements ICommand {
TaskListManager taskListManager = myHandler;
BuildProgressMonitor buildProgressMonitor =
new DefaultBuildProgressMonitor(new Frame()) {
public void finish() {
super.finish();
public void finish(boolean b) {
super.finish(b);
setEndTime(System.currentTimeMillis());
}
};
@@ -280,6 +280,10 @@ class MyTaskListManager
hasWarning = true;
}
}
public void buildSuccessful(boolean wasFullBuild) {
// TODO Auto-generated method stub
}
}

class VoidInvocationHandler implements InvocationHandler {

+ 10
- 1
tests/src/org/aspectj/systemtest/incremental/tools/AjdeInteractionTestbed.java View File

@@ -272,6 +272,8 @@ public class AjdeInteractionTestbed extends TestCase {
public boolean wasFullBuild() {
// alternatives: statelistener is debug interface, progressmonitor is new proper interface (see pr145689)
// return MyBuildProgressMonitor.wasFullBuild();
return MyStateListener.wasFullBuild();
}
@@ -543,6 +545,7 @@ public class AjdeInteractionTestbed extends TestCase {
public static void reset() {
_instance.finished = false;
_instance.wasFullBuild=true;
_instance.compiledFiles.clear();
_instance.wovenClasses.clear();
}
@@ -559,6 +562,7 @@ public class AjdeInteractionTestbed extends TestCase {
private long starttime = 0;
private long totaltimetaken = 0;
private boolean finished = false;
private boolean wasFullBuild = true;

public void start(String configFile) {
starttime = System.currentTimeMillis();
@@ -593,9 +597,10 @@ public class AjdeInteractionTestbed extends TestCase {
return 100;
}

public void finish() {
public void finish(boolean b) {
log("BuildProgressMonitor.finish()");
_instance.finished=true;
_instance.wasFullBuild = b;
_instance.totaltimetaken=(System.currentTimeMillis()-starttime);
}
@@ -607,6 +612,10 @@ public class AjdeInteractionTestbed extends TestCase {
if (VERBOSE) System.out.println(s);
}
public static boolean wasFullBuild() {
return _instance.wasFullBuild;
}

}

Loading…
Cancel
Save