aboutsummaryrefslogtreecommitdiff
path: root/src/lombok/eclipse/TransformEclipseAST.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@tipit.to>2009-06-15 23:36:55 +0200
committerReinier Zwitserloot <reinier@tipit.to>2009-06-15 23:36:55 +0200
commit92ab0e7971df9d1efc9345f17ad48355df95161a (patch)
tree1916e8de1c062f50ebf824a9ce6f93a3fc4753ea /src/lombok/eclipse/TransformEclipseAST.java
parentc2fd0a1ef514ec109f7f1b544f46bfb8338b7e8f (diff)
downloadlombok-92ab0e7971df9d1efc9345f17ad48355df95161a.tar.gz
lombok-92ab0e7971df9d1efc9345f17ad48355df95161a.tar.bz2
lombok-92ab0e7971df9d1efc9345f17ad48355df95161a.zip
Switched the level of the Node object you get during a visitAnnotationOnX call from the Field/Type/Method/Local to the Annotation, so that you can interact with its handled flag.
Diffstat (limited to 'src/lombok/eclipse/TransformEclipseAST.java')
-rw-r--r--src/lombok/eclipse/TransformEclipseAST.java20
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();
}
}
}