From ced7a8d5549af733bd0463daf533d08fe21a65ab Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Mon, 1 Aug 2011 11:21:24 +0200 Subject: 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. --- src/core/lombok/core/debug/DebugSnapshot.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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 { private static AtomicLong counter = new AtomicLong(); private final long when, id = counter.getAndIncrement(); + private final long bits; private final List trace; private final String threadName; private final String message; @@ -19,6 +21,7 @@ public class DebugSnapshot implements Comparable { 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(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 { 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(); } -- cgit