diff options
author | jvanderhel <Jappe.vanderhel@gmail.com> | 2011-12-08 20:41:02 +0100 |
---|---|---|
committer | jvanderhel <Jappe.vanderhel@gmail.com> | 2011-12-08 20:55:39 +0100 |
commit | b476825fc723d10098a11baa61876f4d23eb4c45 (patch) | |
tree | 97f06dd73be27beb9283e2bcf04f3fd0efa7da4c /src/eclipseAgent/lombok/eclipse | |
parent | c502ec24bba580181631146fa5cdee16ffe9ceaf (diff) | |
download | lombok-b476825fc723d10098a11baa61876f4d23eb4c45.tar.gz lombok-b476825fc723d10098a11baa61876f4d23eb4c45.tar.bz2 lombok-b476825fc723d10098a11baa61876f4d23eb4c45.zip |
Fix for issue 308: Allows organize imports works with @Delegate Also fixes errors in eclipse-log when using @Delegate.
Diffstat (limited to 'src/eclipseAgent/lombok/eclipse')
-rw-r--r-- | src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java b/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java index cc72c206..961d80d7 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java +++ b/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java @@ -38,6 +38,7 @@ import lombok.core.AST.Kind; import lombok.eclipse.EclipseAST; import lombok.eclipse.EclipseNode; import lombok.eclipse.TransformEclipseAST; +import lombok.eclipse.handlers.SetGeneratedByVisitor; import org.eclipse.jdt.internal.compiler.CompilationResult; import org.eclipse.jdt.internal.compiler.ast.ASTNode; @@ -324,7 +325,11 @@ public class PatchDelegate { for (BindingTuple pair : methods) { EclipseNode annNode = typeNode.getAst().get(pair.responsible); MethodDeclaration method = createDelegateMethod(pair.fieldName, typeNode, pair, top.compilationResult, annNode); - if (method != null) injectMethod(typeNode, method); + if (method != null) { + SetGeneratedByVisitor visitor = new SetGeneratedByVisitor(annNode.get()); + method.traverse(visitor, ((TypeDeclaration)typeNode.get()).scope); + injectMethod(typeNode, method); + } } } |