aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/lombok/core/debug/DebugSnapshot.java2
-rw-r--r--src/core/lombok/core/debug/DebugSnapshotStore.java7
-rw-r--r--src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java6
3 files changed, 8 insertions, 7 deletions
diff --git a/src/core/lombok/core/debug/DebugSnapshot.java b/src/core/lombok/core/debug/DebugSnapshot.java
index f12cbcc4..d94798e8 100644
--- a/src/core/lombok/core/debug/DebugSnapshot.java
+++ b/src/core/lombok/core/debug/DebugSnapshot.java
@@ -43,7 +43,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()));
- if (message != null) out.append(String.format(message, params));
+ if (message != null) out.append(" ").append(String.format(message, params));
return out.toString();
}
diff --git a/src/core/lombok/core/debug/DebugSnapshotStore.java b/src/core/lombok/core/debug/DebugSnapshotStore.java
index fda3ba14..7abfc07c 100644
--- a/src/core/lombok/core/debug/DebugSnapshotStore.java
+++ b/src/core/lombok/core/debug/DebugSnapshotStore.java
@@ -31,7 +31,7 @@ public class DebugSnapshotStore {
}
}
- public void print(CompilationUnitDeclaration owner, String message, Object... params) {
+ public String print(CompilationUnitDeclaration owner, String message, Object... params) {
List<DebugSnapshot> list;
synchronized (map) {
@@ -54,14 +54,17 @@ public class DebugSnapshotStore {
}
try {
- OutputStream stream = new FileOutputStream(new File(System.getProperty("user.home", "."), String.format("lombok164-%d.err", System.currentTimeMillis())));
+ File logFile = new File(System.getProperty("user.home", "."), String.format("lombok164-%d.err", System.currentTimeMillis()));
+ OutputStream stream = new FileOutputStream(logFile);
try {
stream.write(out.toString().getBytes("UTF-8"));
} finally {
stream.close();
}
+ return logFile.getAbsolutePath();
} catch (Exception e) {
System.err.println(out);
+ return "(can't write log file - emitted to system err)";
}
}
}
diff --git a/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java b/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java
index 5f6691fd..45d58df3 100644
--- a/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java
+++ b/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java
@@ -467,10 +467,8 @@ public class EclipseHandlerUtil {
if (report) {
CompilationUnitDeclaration cud = (CompilationUnitDeclaration) type.top().get();
- DebugSnapshotStore.INSTANCE.print(cud, "Printing: injecting whilst scope is already built.");
-// Eclipse.warning("State: " + Issue164Fixer.getState(cud) + " -- 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. Occurred on class " + new String(parent.name), new Throwable());
+ 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());
}
}