diff options
author | Reinier Zwitserloot <reinier@tipit.to> | 2009-06-15 23:30:01 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@tipit.to> | 2009-06-15 23:30:01 +0200 |
commit | c2fd0a1ef514ec109f7f1b544f46bfb8338b7e8f (patch) | |
tree | 9075fc9580765513da5be66b36f6f7e4f8fec51c /src/lombok/eclipse/EclipseASTAdapter.java | |
parent | 12ff7ca22385eca5ea213c4b2083d7183e174d92 (diff) | |
download | lombok-c2fd0a1ef514ec109f7f1b544f46bfb8338b7e8f.tar.gz lombok-c2fd0a1ef514ec109f7f1b544f46bfb8338b7e8f.tar.bz2 lombok-c2fd0a1ef514ec109f7f1b544f46bfb8338b7e8f.zip |
Added annotations as definitive children of nodes in our custom AST, and updated the visitor to call a separate visitAnnotationOnX method for annotated stuff. This way, 'handled' can be set per annotation.
Also fixed a bug in AST generation that caused StackOverflowErrors on most source files, and did some cosmetic renaming of parameters.
Diffstat (limited to 'src/lombok/eclipse/EclipseASTAdapter.java')
-rw-r--r-- | src/lombok/eclipse/EclipseASTAdapter.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lombok/eclipse/EclipseASTAdapter.java b/src/lombok/eclipse/EclipseASTAdapter.java index 50fded89..d2e0050e 100644 --- a/src/lombok/eclipse/EclipseASTAdapter.java +++ b/src/lombok/eclipse/EclipseASTAdapter.java @@ -3,6 +3,7 @@ package lombok.eclipse; import lombok.eclipse.EclipseAST.Node; import org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration; +import org.eclipse.jdt.internal.compiler.ast.Annotation; import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration; import org.eclipse.jdt.internal.compiler.ast.FieldDeclaration; import org.eclipse.jdt.internal.compiler.ast.Initializer; @@ -14,14 +15,18 @@ public abstract class EclipseASTAdapter implements EclipseASTVisitor { @Override public void visitCompilationUnit(Node node, CompilationUnitDeclaration unit) {} @Override public void endVisitCompilationUnit(Node node, CompilationUnitDeclaration unit) {} @Override public void visitType(Node node, TypeDeclaration type) {} + @Override public void visitAnnotationOnType(Node node, TypeDeclaration type, Annotation annotation) {} @Override public void endVisitType(Node node, TypeDeclaration type) {} @Override public void visitInitializer(Node node, Initializer initializer) {} @Override public void endVisitInitializer(Node node, Initializer initializer) {} @Override public void visitField(Node node, FieldDeclaration field) {} + @Override public void visitAnnotationOnField(Node node, FieldDeclaration Field, Annotation annotation) {} @Override public void endVisitField(Node node, FieldDeclaration field) {} @Override public void visitMethod(Node node, AbstractMethodDeclaration method) {} + @Override public void visitAnnotationOnMethod(Node node, AbstractMethodDeclaration method, Annotation annotation) {} @Override public void endVisitMethod(Node node, AbstractMethodDeclaration method) {} @Override public void visitLocal(Node node, LocalDeclaration local) {} + @Override public void visitAnnotationOnLocal(Node node, LocalDeclaration local, Annotation annotation) {} @Override public void endVisitLocal(Node node, LocalDeclaration local) {} @Override public void visitStatement(Node node, Statement statement) {} @Override public void endVisitStatement(Node node, Statement statement) {} |