From 0f5437319e682481fdfda13b5043982f4235302a Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Mon, 25 Jun 2012 23:07:16 +0200 Subject: Add positions to generated constructor call (issue 336) --- src/core/lombok/eclipse/handlers/HandleConstructor.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/core') diff --git a/src/core/lombok/eclipse/handlers/HandleConstructor.java b/src/core/lombok/eclipse/handlers/HandleConstructor.java index 5731769a..eec41577 100644 --- a/src/core/lombok/eclipse/handlers/HandleConstructor.java +++ b/src/core/lombok/eclipse/handlers/HandleConstructor.java @@ -228,6 +228,8 @@ public class HandleConstructor { constructor.selector = ((TypeDeclaration)type.get()).name; constructor.constructorCall = new ExplicitConstructorCall(ExplicitConstructorCall.ImplicitSuper); setGeneratedBy(constructor.constructorCall, source); + constructor.constructorCall.sourceStart = source.sourceStart; + constructor.constructorCall.sourceEnd = source.sourceEnd; constructor.thrownExceptions = null; constructor.typeParameters = null; constructor.bits |= ECLIPSE_DO_NOT_TOUCH_FLAG; -- cgit From ff2d34b0de25c3653e1350579cae88a58341e62d Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Mon, 25 Jun 2012 23:58:19 +0200 Subject: Updated javadoc --- src/core/lombok/experimental/Accessors.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/lombok/experimental/Accessors.java b/src/core/lombok/experimental/Accessors.java index 5b454273..b925e746 100644 --- a/src/core/lombok/experimental/Accessors.java +++ b/src/core/lombok/experimental/Accessors.java @@ -49,7 +49,8 @@ public @interface Accessors { /** * If present, only fields with any of the stated prefixes are given the getter/setter treatment. - * Note that a prefix only counts if the next character is NOT a lowercase character. If multiple fields + * Note that a prefix only counts if the next character is NOT a lowercase character or the last + * letter of the prefix is not a letter (for instance an underscore). If multiple fields * all turn into the same name when the prefix is stripped, an error will be generated. */ String[] prefix() default {}; -- cgit From 5739ffb0d5d4c8a327aa2ca8a45fbd614a19e152 Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Mon, 2 Jul 2012 21:52:51 +0200 Subject: Fixed issue 374: updated documentation about case insensitive checking for existing methods. --- src/core/lombok/Getter.java | 6 +++--- src/core/lombok/Setter.java | 6 +++--- src/installer/lombok/installer/eclipse/EclipseLocation.java | 2 +- website/features/GetterSetter.html | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/core') diff --git a/src/core/lombok/Getter.java b/src/core/lombok/Getter.java index c812d824..86e14b93 100644 --- a/src/core/lombok/Getter.java +++ b/src/core/lombok/Getter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2010 The Project Lombok Authors. + * Copyright (C) 2009-2012 The Project Lombok Authors. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -45,8 +45,8 @@ import java.lang.annotation.Target; * Note that fields of type {@code boolean} (but not {@code java.lang.Boolean}) will result in an * {@code isFoo} name instead of {@code getFoo}. *

- * If any method named {@code getFoo}/{@code isFoo} exists, regardless of return type or parameters, no method is generated, - * and instead a compiler warning is emitted. + * If any method named {@code getFoo}/{@code isFoo} (case insensitive) exists, regardless of return type or parameters, + * no method is generated, and instead a compiler warning is emitted. *

* This annotation can also be applied to a class, in which case it'll be as if all non-static fields that don't already have * a {@code @Getter} annotation have the annotation. diff --git a/src/core/lombok/Setter.java b/src/core/lombok/Setter.java index ed4c146c..a7318259 100644 --- a/src/core/lombok/Setter.java +++ b/src/core/lombok/Setter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2010 The Project Lombok Authors. + * Copyright (C) 2009-2012 The Project Lombok Authors. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -42,8 +42,8 @@ import java.lang.annotation.Target; * } * * - * If any method named {@code setFoo} exists, regardless of return type or parameters, no method is generated, - * and instead a compiler warning is emitted. + * If any method named {@code setFoo} (case insensitive) exists, regardless of return type or parameters, + * no method is generated, and instead a compiler warning is emitted. *

* This annotation can also be applied to a class, in which case it'll be as if all non-static fields that don't already have * a {@code Setter} annotation have the annotation. diff --git a/src/installer/lombok/installer/eclipse/EclipseLocation.java b/src/installer/lombok/installer/eclipse/EclipseLocation.java index 670eb43b..bf44d1e8 100644 --- a/src/installer/lombok/installer/eclipse/EclipseLocation.java +++ b/src/installer/lombok/installer/eclipse/EclipseLocation.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2010 The Project Lombok Authors. + * Copyright (C) 2009-2012 The Project Lombok Authors. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/website/features/GetterSetter.html b/website/features/GetterSetter.html index b1ae5f24..0a576ea6 100644 --- a/website/features/GetterSetter.html +++ b/website/features/GetterSetter.html @@ -48,7 +48,7 @@ For generating the method names, the first character of the field, if it is a lowercase character, is title-cased, otherwise, it is left unmodified. Then, get/set/is is prefixed.

- No method is generated if any method already exists with the same name and same parameter count. For example, getFoo() + No method is generated if any method already exists with the same name (case insensitive) and same parameter count. For example, getFoo() will not be generated if there's already a method getFoo(String... x) even though it is technically possible to make the method. This caveat exists to prevent confusion. If the generation of a method is skipped for this reason, a warning is emitted instead. Varargs count as 0 to N parameters.

-- cgit