diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2011-08-01 11:21:24 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2011-08-01 11:21:24 +0200 |
commit | ced7a8d5549af733bd0463daf533d08fe21a65ab (patch) | |
tree | bd15e2d55e31af717a7498cb7683414c35ec638d /src | |
parent | 6f8e8adf4c0c31aa17573da89938bc50894f0a52 (diff) | |
download | lombok-ced7a8d5549af733bd0463daf533d08fe21a65ab.tar.gz lombok-ced7a8d5549af733bd0463daf533d08fe21a65ab.tar.bz2 lombok-ced7a8d5549af733bd0463daf533d08fe21a65ab.zip |
Added the state of the HasAllMethodBodies flag in the issue 164 analyser. Looks like eclipse sometimes sets this flag even though
all method bodies are not in fact parsed yet, as a shortcut to try and force future eclipse parse runs to simply skip doing it
as a timesaver. D'oh.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/lombok/core/debug/DebugSnapshot.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/lombok/core/debug/DebugSnapshot.java b/src/core/lombok/core/debug/DebugSnapshot.java index d94798e8..3982539e 100644 --- a/src/core/lombok/core/debug/DebugSnapshot.java +++ b/src/core/lombok/core/debug/DebugSnapshot.java @@ -5,12 +5,14 @@ import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicLong; +import org.eclipse.jdt.internal.compiler.ast.ASTNode; import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration; public class DebugSnapshot implements Comparable<DebugSnapshot> { private static AtomicLong counter = new AtomicLong(); private final long when, id = counter.getAndIncrement(); + private final long bits; private final List<StackTraceElement> trace; private final String threadName; private final String message; @@ -19,6 +21,7 @@ public class DebugSnapshot implements Comparable<DebugSnapshot> { public DebugSnapshot(CompilationUnitDeclaration owner, int stackHiding, String message, Object... params) { this.when = System.currentTimeMillis(); + this.bits = owner.bits; StackTraceElement[] stackTrace = new Throwable().getStackTrace(); this.trace = new ArrayList<StackTraceElement>(Math.max(0, stackTrace.length - stackHiding - 1)); for (int i = 1 + stackHiding; i < stackTrace.length; i++) trace.add(stackTrace[i]); @@ -42,7 +45,7 @@ public class DebugSnapshot implements Comparable<DebugSnapshot> { public String shortToString() { StringBuilder out = new StringBuilder(); - out.append(String.format("WHEN: %14d THREAD: %s AST: %s", when, threadName, ownerName())); + out.append(String.format("WHEN: %14d THREAD: %s AST: %s HAMB: %b -- ", when, threadName, ownerName(), 0 != (bits & ASTNode.HasAllMethodBodies))); if (message != null) out.append(" ").append(String.format(message, params)); return out.toString(); } |