From d16775032b638789f998f3f362b7ed7d4f5098ae Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Thu, 27 Aug 2009 23:35:05 +0200 Subject: Set the source positions in eclipse of copied over annotations (used in @NonNull/@Nullable and getter/setter/constructor generation) to 0, as eclipse mysteriously fails for annotations copied WITH source positions, but only on methods (which happens for @Getter). --- src/lombok/eclipse/Eclipse.java | 6 +++--- src/lombok/eclipse/handlers/HandleEqualsAndHashCode.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/lombok/eclipse/Eclipse.java b/src/lombok/eclipse/Eclipse.java index 017affa1..361727bc 100644 --- a/src/lombok/eclipse/Eclipse.java +++ b/src/lombok/eclipse/Eclipse.java @@ -275,16 +275,16 @@ public class Eclipse { public static Annotation copyAnnotation(Annotation annotation) { if (annotation instanceof MarkerAnnotation) { - return new MarkerAnnotation(copyType(annotation.type), annotation.sourceStart); + return new MarkerAnnotation(copyType(annotation.type), 0); } if (annotation instanceof SingleMemberAnnotation) { - SingleMemberAnnotation result = new SingleMemberAnnotation(copyType(annotation.type), annotation.sourceStart); + SingleMemberAnnotation result = new SingleMemberAnnotation(copyType(annotation.type), 0); result.memberValue = ((SingleMemberAnnotation)annotation).memberValue; } if (annotation instanceof NormalAnnotation) { - NormalAnnotation result = new NormalAnnotation(copyType(annotation.type), annotation.sourceStart); + NormalAnnotation result = new NormalAnnotation(copyType(annotation.type), 0); result.memberValuePairs = ((NormalAnnotation)annotation).memberValuePairs; } diff --git a/src/lombok/eclipse/handlers/HandleEqualsAndHashCode.java b/src/lombok/eclipse/handlers/HandleEqualsAndHashCode.java index 1adbe781..d4435fce 100644 --- a/src/lombok/eclipse/handlers/HandleEqualsAndHashCode.java +++ b/src/lombok/eclipse/handlers/HandleEqualsAndHashCode.java @@ -223,7 +223,7 @@ public class HandleEqualsAndHashCode implements EclipseAnnotationHandler