diff options
author | aclement <aclement> | 2006-07-24 11:05:49 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-07-24 11:05:49 +0000 |
commit | beaeab3dbf69175b3f08c30bb6ae82aa6b4eb728 (patch) | |
tree | 26c99fd1ff42af254ffc19d4c03c4adaf6a87a7f | |
parent | 97b3ae73a8d18db916f0fa10189d658003eb068c (diff) | |
download | aspectj-beaeab3dbf69175b3f08c30bb6ae82aa6b4eb728.tar.gz aspectj-beaeab3dbf69175b3f08c30bb6ae82aa6b4eb728.zip |
pr145689 - telling AJDT through the progress monitor (rather than a debug interface) whether the build was full or incremental.
10 files changed, 27 insertions, 10 deletions
diff --git a/ajde/src/org/aspectj/ajde/BuildProgressMonitor.java b/ajde/src/org/aspectj/ajde/BuildProgressMonitor.java index 17fef6a8f..2a3e2cd88 100644 --- a/ajde/src/org/aspectj/ajde/BuildProgressMonitor.java +++ b/ajde/src/org/aspectj/ajde/BuildProgressMonitor.java @@ -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); } diff --git a/ajde/src/org/aspectj/ajde/internal/AspectJBuildManager.java b/ajde/src/org/aspectj/ajde/internal/AspectJBuildManager.java index af2366481..eca810e5c 100644 --- a/ajde/src/org/aspectj/ajde/internal/AspectJBuildManager.java +++ b/ajde/src/org/aspectj/ajde/internal/AspectJBuildManager.java @@ -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); } diff --git a/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java b/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java index e113034c2..0ba47eb7f 100644 --- a/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java +++ b/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java @@ -646,4 +646,8 @@ public class CompilerAdapter { buildManager.setState(buildState); buildManager.setStructureModel(buildState.getStructureModel()); } + + public boolean wasFullBuild() { + return buildManager.wasFullBuild(); + } } diff --git a/ajde/src/org/aspectj/ajde/ui/swing/DefaultBuildProgressMonitor.java b/ajde/src/org/aspectj/ajde/ui/swing/DefaultBuildProgressMonitor.java index 6cc142192..5328c9616 100644 --- a/ajde/src/org/aspectj/ajde/ui/swing/DefaultBuildProgressMonitor.java +++ b/ajde/src/org/aspectj/ajde/ui/swing/DefaultBuildProgressMonitor.java @@ -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(); } diff --git a/ajde/testsrc/org/aspectj/ajde/BuildCancellingTest.java b/ajde/testsrc/org/aspectj/ajde/BuildCancellingTest.java index 2e5d0dacc..80cda993d 100644 --- a/ajde/testsrc/org/aspectj/ajde/BuildCancellingTest.java +++ b/ajde/testsrc/org/aspectj/ajde/BuildCancellingTest.java @@ -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) { } } diff --git a/ajde/testsrc/org/aspectj/ajde/NullIdeProgressMonitor.java b/ajde/testsrc/org/aspectj/ajde/NullIdeProgressMonitor.java index ebac2cf45..ab451f04d 100644 --- a/ajde/testsrc/org/aspectj/ajde/NullIdeProgressMonitor.java +++ b/ajde/testsrc/org/aspectj/ajde/NullIdeProgressMonitor.java @@ -38,7 +38,7 @@ public class NullIdeProgressMonitor implements BuildProgressMonitor { return 0; } - public void finish() { + public void finish(boolean b) { } diff --git a/ajde/testsrc/org/aspectj/ajde/ReweavableTestCase.java b/ajde/testsrc/org/aspectj/ajde/ReweavableTestCase.java index 74035a4c7..d2e95da66 100644 --- a/ajde/testsrc/org/aspectj/ajde/ReweavableTestCase.java +++ b/ajde/testsrc/org/aspectj/ajde/ReweavableTestCase.java @@ -406,7 +406,7 @@ public class ReweavableTestCase extends AjdeTestCase { return 0; } - public void finish() {} + public void finish(boolean b) {} } diff --git a/ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java b/ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java index 34c7b05c1..743c54c2a 100644 --- a/ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java +++ b/ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java @@ -320,7 +320,7 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase { return 0; } - public void finish() {} + public void finish(boolean b) {} } diff --git a/testing/src/org/aspectj/testing/ajde/CompileCommand.java b/testing/src/org/aspectj/testing/ajde/CompileCommand.java index 8be020895..246e3d216 100644 --- a/testing/src/org/aspectj/testing/ajde/CompileCommand.java +++ b/testing/src/org/aspectj/testing/ajde/CompileCommand.java @@ -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 { diff --git a/tests/src/org/aspectj/systemtest/incremental/tools/AjdeInteractionTestbed.java b/tests/src/org/aspectj/systemtest/incremental/tools/AjdeInteractionTestbed.java index 4d0cb5ac7..d50e340fb 100644 --- a/tests/src/org/aspectj/systemtest/incremental/tools/AjdeInteractionTestbed.java +++ b/tests/src/org/aspectj/systemtest/incremental/tools/AjdeInteractionTestbed.java @@ -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; + } + } |