diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/lombok/javac/JavacTransformer.java | 9 | ||||
-rw-r--r-- | src/core/lombok/javac/TrackChangedAsts.java | 10 |
2 files changed, 14 insertions, 5 deletions
diff --git a/src/core/lombok/javac/JavacTransformer.java b/src/core/lombok/javac/JavacTransformer.java index e90f780b..f9757894 100644 --- a/src/core/lombok/javac/JavacTransformer.java +++ b/src/core/lombok/javac/JavacTransformer.java @@ -42,7 +42,7 @@ public class JavacTransformer { this.handlers = HandlerLibrary.load(messager); } - public boolean transform(boolean postResolution, Context context, java.util.List<JCCompilationUnit> compilationUnitsRaw) { + public void transform(boolean postResolution, Context context, java.util.List<JCCompilationUnit> compilationUnitsRaw) { List<JCCompilationUnit> compilationUnits; if (compilationUnitsRaw instanceof List<?>) { compilationUnits = (List<JCCompilationUnit>)compilationUnitsRaw; @@ -78,11 +78,10 @@ public class JavacTransformer { } } - for (JavacAST ast : asts) { - if (ast.isChanged()) return true; + TrackChangedAsts changes = context.get(TrackChangedAsts.class); + if (changes != null) for (JavacAST ast : asts) { + if (ast.isChanged()) changes.changed.add((JCCompilationUnit) ast.top().get()); } - - return false; } private class AnnotationVisitor extends JavacASTAdapter { diff --git a/src/core/lombok/javac/TrackChangedAsts.java b/src/core/lombok/javac/TrackChangedAsts.java new file mode 100644 index 00000000..fa6c0f18 --- /dev/null +++ b/src/core/lombok/javac/TrackChangedAsts.java @@ -0,0 +1,10 @@ +package lombok.javac; + +import java.util.HashSet; +import java.util.Set; + +import com.sun.tools.javac.tree.JCTree.JCCompilationUnit; + +public class TrackChangedAsts { + public final Set<JCCompilationUnit> changed = new HashSet<JCCompilationUnit>(); +}
\ No newline at end of file |