diff options
author | aclement <aclement> | 2010-06-04 17:10:17 +0000 |
---|---|---|
committer | aclement <aclement> | 2010-06-04 17:10:17 +0000 |
commit | 86c0bf1c58db42e9b34918b0f354528b5ac1e085 (patch) | |
tree | 8d510cc2a868f0af063c1f4a1fa12099707b4029 | |
parent | 65993866835efcf54ff9b4ac0f3294efabd13e5f (diff) | |
download | aspectj-86c0bf1c58db42e9b34918b0f354528b5ac1e085.tar.gz aspectj-86c0bf1c58db42e9b34918b0f354528b5ac1e085.zip |
309710
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java index f1869c306..bfe021157 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java @@ -511,16 +511,32 @@ public class AjState implements CompilerConfigurationChangeFlags { // if it is an aspect we may or may not be in trouble depending on whether (a) we depend on it (b) it is on the // classpath or the aspectpath if (state.isAspect(classFile)) { - if (state.hasStructuralChangedSince(classFile, lastSuccessfulBuildTime) || isTypeWeReferTo(classFile)) { - // further improvements possible - if (pathid != PATHID_CLASSPATH) { + boolean hasStructuralChanges = state.hasStructuralChangedSince(classFile, lastSuccessfulBuildTime); + if (hasStructuralChanges || isTypeWeReferTo(classFile)) { + if (hasStructuralChanges) { if (listenerDefined()) { getListener().recordDecision( - "ClassFileChangeChecking: aspect found that has structurally changed or that this project depends upon : " - + classFile); + "ClassFileChangeChecking: aspect found that has structurally changed : " + classFile); } return CLASS_FILE_CHANGED_THAT_NEEDS_FULL_BUILD; + } else { + // must be 'isTypeWeReferTo()' + if (pathid == PATHID_CLASSPATH) { + if (listenerDefined()) { + getListener().recordDecision( + "ClassFileChangeChecking: aspect found that this project refers to : " + classFile + + " but only referred to via classpath"); + } + } else { + if (listenerDefined()) { + getListener().recordDecision( + "ClassFileChangeChecking: aspect found that this project refers to : " + classFile + + " from either inpath/aspectpath, switching to full build"); + } + return CLASS_FILE_CHANGED_THAT_NEEDS_FULL_BUILD; + } } + } else { // it is an aspect but we don't refer to it: // - for CLASSPATH I think this is OK, we can continue and try an @@ -566,14 +582,12 @@ public class AjState implements CompilerConfigurationChangeFlags { if (state.isAspect(classFile)) { if (state.hasStructuralChangedSince(classFile, lastSuccessfulBuildTime) || isTypeWeReferTo(classFile)) { // further improvements possible - if (pathid != PATHID_CLASSPATH) { - if (listenerDefined()) { - getListener().recordDecision( - "ClassFileChangeChecking: aspect found that has structurally changed or that this project depends upon : " - + classFile); - } - return CLASS_FILE_CHANGED_THAT_NEEDS_FULL_BUILD; + if (listenerDefined()) { + getListener().recordDecision( + "ClassFileChangeChecking: aspect found that has structurally changed or that this project depends upon : " + + classFile); } + return CLASS_FILE_CHANGED_THAT_NEEDS_FULL_BUILD; } else { // it is an aspect but we don't refer to it: // - for CLASSPATH I think this is OK, we can continue and try an @@ -2061,10 +2075,10 @@ public class AjState implements CompilerConfigurationChangeFlags { } public void write(CompressingDataOutputStream dos) throws IOException { - // model // weaver weaver.write(dos); // world + // model // local state } } |