diff options
author | wisberg <wisberg> | 2005-06-15 05:59:47 +0000 |
---|---|---|
committer | wisberg <wisberg> | 2005-06-15 05:59:47 +0000 |
commit | 14b501c3673050c17c5df9ab54b85193f0fe4313 (patch) | |
tree | b85200d211e6c1e2034fb2dd6fdf507a993364a7 /build/src/org/aspectj/internal | |
parent | 149efd373e0ce99fcc7f4cfbacfddca0bde83a97 (diff) | |
download | aspectj-14b501c3673050c17c5df9ab54b85193f0fe4313.tar.gz aspectj-14b501c3673050c17c5df9ab54b85193f0fe4313.zip |
out-of-date check working. Better logging
Diffstat (limited to 'build/src/org/aspectj/internal')
-rw-r--r-- | build/src/org/aspectj/internal/tools/build/Builder.java | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/build/src/org/aspectj/internal/tools/build/Builder.java b/build/src/org/aspectj/internal/tools/build/Builder.java index cfac0192d..7175eb61c 100644 --- a/build/src/org/aspectj/internal/tools/build/Builder.java +++ b/build/src/org/aspectj/internal/tools/build/Builder.java @@ -305,6 +305,10 @@ public abstract class Builder { } return noErr; } + + protected final boolean isLogging() { + return (verbose && (null != this.handler)); + } protected Result[] skipUptodate(Result[] results) { if (null == results) { @@ -313,7 +317,7 @@ public abstract class Builder { Result[] done = new Result[results.length]; int to = 0; for (int i = 0; i < done.length; i++) { - if ((null != results[i]) && results[i].outOfDate(false)) { + if ((null != results[i]) && results[i].outOfDate()) { done[to++] = results[i]; } } @@ -338,10 +342,7 @@ public abstract class Builder { Result[] buildList = skipUptodate(getAntecedantResults(result)); ArrayList doneList = new ArrayList(); if ((null != buildList) && (0 < buildList.length)) { - final Modules modules = result.getModule().getModules(); - final Messager handler = this.handler; - final boolean log = (verbose && (null != handler)); - if (log) { + if (isLogging()) { handler.log("modules to build: " + Arrays.asList(buildList)); } for (int i = 0; i < buildList.length; i++) { @@ -352,13 +353,8 @@ public abstract class Builder { String requiredName = required.getName(); if (!doneList.contains(requiredName)) { doneList.add(requiredName); - if (required.outOfDate(false)) { - if (log) { - handler.log("building " + requiredName); - } - if (!buildOnly(required, errors)) { - return false; - } + if (!buildOnly(required, errors)) { + return false; } } } @@ -376,6 +372,12 @@ public abstract class Builder { * @return false after successful build, when module jar should exist */ protected final boolean buildOnly(Result result, List errors) { + if (!result.outOfDate()) { + return true; + } + if (isLogging()) { + handler.log("building " + result); + } if (!buildingEnabled) { return false; } |