aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/eclipse
diff options
context:
space:
mode:
authorRoel Spilker <r.spilker@gmail.com>2009-11-27 03:10:03 +0100
committerRoel Spilker <r.spilker@gmail.com>2009-11-27 03:10:03 +0100
commite54c3f36e3122dfe34a119178cfcca2dcdbad998 (patch)
tree7ff5fb5ef40a34e0c36b4d6821af20e4c79d9a44 /src/core/lombok/eclipse
parentc91e3701b9f5cf85a09f998d305895d4d1617206 (diff)
downloadlombok-e54c3f36e3122dfe34a119178cfcca2dcdbad998.tar.gz
lombok-e54c3f36e3122dfe34a119178cfcca2dcdbad998.tar.bz2
lombok-e54c3f36e3122dfe34a119178cfcca2dcdbad998.zip
Added change tracking so that 1 AST instance can tell you if any processor changed anything.
Diffstat (limited to 'src/core/lombok/eclipse')
-rw-r--r--src/core/lombok/eclipse/EclipseAST.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/lombok/eclipse/EclipseAST.java b/src/core/lombok/eclipse/EclipseAST.java
index e42e5de2..7f436ddf 100644
--- a/src/core/lombok/eclipse/EclipseAST.java
+++ b/src/core/lombok/eclipse/EclipseAST.java
@@ -60,6 +60,7 @@ public class EclipseAST extends AST<EclipseAST, EclipseNode, ASTNode> {
this.compilationUnitDeclaration = ast;
setTop(buildCompilationUnit(ast));
this.completeParse = isComplete(ast);
+ clearChanged();
}
/** {@inheritDoc} */
@@ -201,12 +202,14 @@ public class EclipseAST extends AST<EclipseAST, EclipseNode, ASTNode> {
public void reparse() {
propagateProblems();
if (completeParse) return;
+ boolean changed = isChanged();
boolean newCompleteParse = isComplete(compilationUnitDeclaration);
if (!newCompleteParse) return;
top().rebuild();
this.completeParse = true;
+ if (!changed) clearChanged();
}
private static boolean isComplete(CompilationUnitDeclaration unit) {