From bf3b347a6997efcaa0a599f5b3903da002197957 Mon Sep 17 00:00:00 2001 From: jhugunin Date: Fri, 3 Jan 2003 01:44:18 +0000 Subject: [PATCH] better incremental support --- .../ajdt/internal/core/builder/AjBuildManager.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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(); ) { -- 2.39.5