From 1f1fd17350bd61169e2aa01e5c3377801fb18a08 Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Sun, 15 Aug 2010 22:38:32 +0200 Subject: Added name of compilation unit to error/warnings generated by postProcess. --- src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java | 3 ++- src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java index 1d2efea0..2ac24a48 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java +++ b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java @@ -93,7 +93,8 @@ public class EclipsePatcher extends Agent { sm.addScript(ScriptBuilder.wrapMethodCall() .target(new MethodTarget("org.eclipse.jdt.internal.compiler.util.Util", "writeToDisk")) .methodToWrap(new Hook("java.io.BufferedOutputStream", "", "void", "java.io.OutputStream", "int")) - .wrapMethod(new Hook("lombok.eclipse.agent.PatchFixes", "runPostCompiler", "java.io.BufferedOutputStream", "java.io.BufferedOutputStream")) + .wrapMethod(new Hook("lombok.eclipse.agent.PatchFixes", "runPostCompiler", "java.io.BufferedOutputStream", "java.io.BufferedOutputStream", "java.lang.String", "java.lang.String")) + .requestExtra(StackRequest.PARAM2, StackRequest.PARAM3) .build()); } diff --git a/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java b/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java index 48103a98..b9bfe22b 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java +++ b/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java @@ -123,7 +123,8 @@ public class PatchFixes { return PostCompiler.wrapOutputStream(out, "TEST", DiagnosticsReceiver.CONSOLE); } - public static BufferedOutputStream runPostCompiler(BufferedOutputStream out) throws IOException { - return new BufferedOutputStream(PostCompiler.wrapOutputStream(out, "TEST", DiagnosticsReceiver.CONSOLE)); + public static BufferedOutputStream runPostCompiler(BufferedOutputStream out, String path, String name) throws IOException { + String fileName = path + "/" + name; + return new BufferedOutputStream(PostCompiler.wrapOutputStream(out, fileName, DiagnosticsReceiver.CONSOLE)); } } -- cgit