aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/eclipse
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2011-07-24 04:38:31 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2011-07-24 04:38:31 +0200
commit92eb7033fa16ef14c05cb4461dc005a752399180 (patch)
treef10fa176acc63aeeca57d18a084c14f66c689839 /src/core/lombok/eclipse
parentd4b4a92302af4d52a2a1d07524cb506bdecadf14 (diff)
parenta24daba66ce4705429b266972319ad15b1db0d70 (diff)
downloadlombok-92eb7033fa16ef14c05cb4461dc005a752399180.tar.gz
lombok-92eb7033fa16ef14c05cb4461dc005a752399180.tar.bz2
lombok-92eb7033fa16ef14c05cb4461dc005a752399180.zip
Merge branch 'i164diag'
Diffstat (limited to 'src/core/lombok/eclipse')
-rw-r--r--src/core/lombok/eclipse/TransformEclipseAST.java4
-rw-r--r--src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java8
2 files changed, 9 insertions, 3 deletions
diff --git a/src/core/lombok/eclipse/TransformEclipseAST.java b/src/core/lombok/eclipse/TransformEclipseAST.java
index 7ef06fca..b362f399 100644
--- a/src/core/lombok/eclipse/TransformEclipseAST.java
+++ b/src/core/lombok/eclipse/TransformEclipseAST.java
@@ -23,6 +23,7 @@ package lombok.eclipse;
import java.lang.reflect.Field;
+import lombok.core.debug.DebugSnapshotStore;
import lombok.patcher.Symbols;
import org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration;
@@ -126,9 +127,12 @@ public class TransformEclipseAST {
// Do NOT abort if (ast.bits & ASTNode.HasAllMethodBodies) != 0 - that doesn't work.
try {
+ DebugSnapshotStore.INSTANCE.snapshot(ast, "transform entry");
EclipseAST existing = getAST(ast, false);
new TransformEclipseAST(existing).go();
+ DebugSnapshotStore.INSTANCE.snapshot(ast, "transform exit");
} catch (Throwable t) {
+ DebugSnapshotStore.INSTANCE.snapshot(ast, "transform error: %s", t.getClass().getSimpleName());
try {
String message = "Lombok can't parse this source: " + t.toString();
diff --git a/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java b/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java
index 627acecb..45d58df3 100644
--- a/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java
+++ b/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java
@@ -25,6 +25,7 @@ import static lombok.eclipse.Eclipse.*;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
+import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Arrays;
@@ -37,6 +38,7 @@ import lombok.Getter;
import lombok.Lombok;
import lombok.core.AnnotationValues;
import lombok.core.AST.Kind;
+import lombok.core.debug.DebugSnapshotStore;
import lombok.core.handlers.TransformationsUtil;
import lombok.eclipse.Eclipse;
import lombok.eclipse.EclipseNode;
@@ -464,9 +466,9 @@ public class EclipseHandlerUtil {
}
if (report) {
- Eclipse.warning("We believe you may have just stumbled on lombok issue #164. Please " +
- "report the stack trace associated with this message at:\n" +
- "http://code.google.com/p/projectlombok/issues/detail?id=164", new Throwable());
+ CompilationUnitDeclaration cud = (CompilationUnitDeclaration) type.top().get();
+ String logFileLocation = DebugSnapshotStore.INSTANCE.print(cud, "Printing: injecting whilst scope is already built.");
+ Eclipse.warning("We believe you may have stumbled on issue 164. Please upload file " + logFileLocation + " to: http://code.google.com/p/projectlombok/issues/detail?id=164", new Throwable());
}
}