]> source.dussan.org Git - aspectj.git/commitdiff
better incremental support
authorjhugunin <jhugunin>
Fri, 3 Jan 2003 01:44:18 +0000 (01:44 +0000)
committerjhugunin <jhugunin>
Fri, 3 Jan 2003 01:44:18 +0000 (01:44 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java

index a5f19ca94c1534385898d545c5ae1aff79564a61..80e76146c223fdc02ce23a14b342f657f2f8cc73 100644 (file)
@@ -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(); ) {