From e54c3f36e3122dfe34a119178cfcca2dcdbad998 Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Fri, 27 Nov 2009 03:10:03 +0100 Subject: Added change tracking so that 1 AST instance can tell you if any processor changed anything. --- src/core/lombok/eclipse/EclipseAST.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core/lombok/eclipse') 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 { this.compilationUnitDeclaration = ast; setTop(buildCompilationUnit(ast)); this.completeParse = isComplete(ast); + clearChanged(); } /** {@inheritDoc} */ @@ -201,12 +202,14 @@ public class EclipseAST extends AST { 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) { -- cgit