aboutsummaryrefslogtreecommitdiff
path: root/src/lombok/eclipse/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'src/lombok/eclipse/handlers')
-rw-r--r--src/lombok/eclipse/handlers/HandleGetter.java8
-rw-r--r--src/lombok/eclipse/handlers/HandlePrintAST.java4
2 files changed, 8 insertions, 4 deletions
diff --git a/src/lombok/eclipse/handlers/HandleGetter.java b/src/lombok/eclipse/handlers/HandleGetter.java
index bf1aa9b0..6be978c6 100644
--- a/src/lombok/eclipse/handlers/HandleGetter.java
+++ b/src/lombok/eclipse/handlers/HandleGetter.java
@@ -29,8 +29,8 @@ public class HandleGetter implements EclipseAnnotationHandler<Getter> {
annotationNode.addWarning(String.format("Not generating %s(): A method with that name already exists", methodName));
}
- @Override public void handle(AnnotationValues<Getter> annotation, Annotation ast, Node annotationNode) {
- if ( !(annotationNode.up().get() instanceof FieldDeclaration) ) return;
+ @Override public boolean handle(AnnotationValues<Getter> annotation, Annotation ast, Node annotationNode) {
+ if ( !(annotationNode.up().get() instanceof FieldDeclaration) ) return false;
FieldDeclaration field = (FieldDeclaration) annotationNode.up().get();
TypeReference fieldType = field.type;
String getterName = TransformationsUtil.toGetterName(
@@ -40,7 +40,7 @@ public class HandleGetter implements EclipseAnnotationHandler<Getter> {
if ( parent.methods != null ) for ( AbstractMethodDeclaration method : parent.methods ) {
if ( method.selector != null && new String(method.selector).equals(getterName) ) {
generateDuplicateGetterWarning(annotationNode, getterName);
- return;
+ return false;
}
}
@@ -69,6 +69,8 @@ public class HandleGetter implements EclipseAnnotationHandler<Getter> {
newArray[parent.methods.length] = method;
parent.methods = newArray;
}
+
+ return true;
}
private int toModifier(AccessLevel value) {
diff --git a/src/lombok/eclipse/handlers/HandlePrintAST.java b/src/lombok/eclipse/handlers/HandlePrintAST.java
index 2e379ce3..4438f4e4 100644
--- a/src/lombok/eclipse/handlers/HandlePrintAST.java
+++ b/src/lombok/eclipse/handlers/HandlePrintAST.java
@@ -11,7 +11,9 @@ import lombok.eclipse.EclipseAST.Node;
@ProviderFor(EclipseAnnotationHandler.class)
public class HandlePrintAST implements EclipseAnnotationHandler<PrintAST> {
- @Override public void handle(AnnotationValues<PrintAST> annotation, Annotation ast, Node annotationNode) {
+ @Override public boolean handle(AnnotationValues<PrintAST> annotation, Annotation ast, Node annotationNode) {
+ if ( !annotationNode.isCompleteParse() ) return false;
annotationNode.up().traverse(new EclipseASTVisitor.EclipseASTPrinter());
+ return true;
}
}