From: jhugunin Date: Fri, 3 Jan 2003 01:44:18 +0000 (+0000) Subject: better incremental support X-Git-Tag: V_1_1_b5~176 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=bf3b347a6997efcaa0a599f5b3903da002197957;p=aspectj.git better incremental support --- diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java index a5f19ca94..80e76146c 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java @@ -151,8 +151,9 @@ public class AjBuildManager { } public boolean incrementalBuild(AjBuildConfig buildConfig, IMessageHandler messageHandler) throws CoreException, IOException { + final CountingMessageHandler counter = new CountingMessageHandler(messageHandler); try { - currentHandler = messageHandler; + currentHandler = counter; IncrementalBuilder builder = getIncrementalBuilder(messageHandler); // SimpleLookupTable deltas = //XXX for Mik, replace this with a call to builder.build(SimpleLookupTable deltas) @@ -166,8 +167,14 @@ public class AjBuildManager { getJavaBuilder().binaryResources = new SimpleLookupTable(); SimpleLookupTable deltas = getDeltas(buildConfig); + //MessageUtil.info(messageHandler, "about to do incremental build: " + deltas); + boolean succeeded = builder.build(deltas); + if (counter.hasErrors()) { + return false; + } + if (succeeded) { return weaveAndGenerateClassFiles(builder.getNewState()); } else { @@ -181,6 +188,7 @@ public class AjBuildManager { SimpleLookupTable getDeltas(AjBuildConfig newBuildConfig) { updateBuildConfig(newBuildConfig); + //System.err.println("sourceRoots: " + newBuildConfig.getSourceRoots()); // !!! support multiple source roots SimpleLookupTable deltas = new SimpleLookupTable(); for (Iterator i = newBuildConfig.getSourceRoots().iterator(); i.hasNext(); ) {