From 71c48fb991c657aaa30b805bc0e10e5bd00bec3b Mon Sep 17 00:00:00 2001 From: jvanderhel Date: Tue, 13 Dec 2011 00:32:48 +0100 Subject: Fix for Issue 315: HandleLogger now sets all its sourcepositions and generatedBy's. convertToFieldDeclaration now als marks the resulting FieldDeclaration as isGenerated --- src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/eclipseAgent') diff --git a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java index 25f7d7ce..1a3828c1 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java +++ b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java @@ -310,6 +310,13 @@ public class EclipsePatcher extends Agent { .wrapMethod(new Hook("lombok.eclipse.agent.PatchFixes", "setIsGeneratedFlag", "void", "org.eclipse.jdt.core.dom.ASTNode", "org.eclipse.jdt.internal.compiler.ast.ASTNode")) .transplant().build()); + + sm.addScript(ScriptBuilder.wrapReturnValue() + .target(new MethodTarget("org.eclipse.jdt.core.dom.ASTConverter", "convertToFieldDeclaration", "org.eclipse.jdt.core.dom.FieldDeclaration", "org.eclipse.jdt.internal.compiler.ast.FieldDeclaration")) + .request(StackRequest.PARAM1, StackRequest.RETURN_VALUE) + .wrapMethod(new Hook("lombok.eclipse.agent.PatchFixes", "setIsGeneratedFlag", "void", + "org.eclipse.jdt.core.dom.ASTNode", "org.eclipse.jdt.internal.compiler.ast.ASTNode")) + .transplant().build()); sm.addScript(ScriptBuilder.wrapMethodCall() .target(new TargetMatcher() { -- cgit