diff options
Diffstat (limited to 'src/lombok/eclipse/TransformEclipseAST.java')
-rw-r--r-- | src/lombok/eclipse/TransformEclipseAST.java | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/lombok/eclipse/TransformEclipseAST.java b/src/lombok/eclipse/TransformEclipseAST.java index 1a1561c3..afc4cdb3 100644 --- a/src/lombok/eclipse/TransformEclipseAST.java +++ b/src/lombok/eclipse/TransformEclipseAST.java @@ -112,20 +112,24 @@ public class TransformEclipseAST { } private static class AnnotationVisitor extends EclipseASTAdapter { - @Override public void visitAnnotationOnField(Node node, FieldDeclaration field, Annotation annotation) { - handlers.handle((CompilationUnitDeclaration) node.top().node, node, annotation); + @Override public void visitAnnotationOnField(FieldDeclaration field, Node annotationNode, Annotation annotation) { + handlers.handle((CompilationUnitDeclaration) annotationNode.top().node, annotationNode.up(), annotation); + annotationNode.setHandled(); } - @Override public void visitAnnotationOnLocal(Node node, LocalDeclaration local, Annotation annotation) { - handlers.handle((CompilationUnitDeclaration) node.top().node, node, annotation); + @Override public void visitAnnotationOnLocal(LocalDeclaration local, Node annotationNode, Annotation annotation) { + handlers.handle((CompilationUnitDeclaration) annotationNode.top().node, annotationNode.up(), annotation); + annotationNode.setHandled(); } - @Override public void visitAnnotationOnMethod(Node node, AbstractMethodDeclaration method, Annotation annotation) { - handlers.handle((CompilationUnitDeclaration) node.top().node, node, annotation); + @Override public void visitAnnotationOnMethod(AbstractMethodDeclaration method, Node annotationNode, Annotation annotation) { + handlers.handle((CompilationUnitDeclaration) annotationNode.top().node, annotationNode.up(), annotation); + annotationNode.setHandled(); } - @Override public void visitAnnotationOnType(Node node, TypeDeclaration type, Annotation annotation) { - handlers.handle((CompilationUnitDeclaration) node.top().node, node, annotation); + @Override public void visitAnnotationOnType(TypeDeclaration type, Node annotationNode, Annotation annotation) { + handlers.handle((CompilationUnitDeclaration) annotationNode.top().node, annotationNode.up(), annotation); + annotationNode.setHandled(); } } } |