diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2016-03-07 15:21:01 +0100 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2016-03-07 15:21:01 +0100 |
commit | 3378cbe65553e685afaad816c260426438aa434b (patch) | |
tree | 8ae03f26c05d6a23bde7ef546f8f04bf936c301c /test | |
parent | 07b8af4cc5c844c9e085e2c4662df1d08221e710 (diff) | |
download | lombok-3378cbe65553e685afaad816c260426438aa434b.tar.gz lombok-3378cbe65553e685afaad816c260426438aa434b.tar.bz2 lombok-3378cbe65553e685afaad816c260426438aa434b.zip |
@Helper is now legal in just about every place method local classes are legal. Also now no longer messes up syntax highlighting in eclipse.
Still need to investigate how to improve autocomplete presence of helper methods.
Diffstat (limited to 'test')
5 files changed, 53 insertions, 43 deletions
diff --git a/test/transform/resource/after-delombok/Helper.java b/test/transform/resource/after-delombok/Helper.java index 52f50dd2..64ecb492 100644 --- a/test/transform/resource/after-delombok/Helper.java +++ b/test/transform/resource/after-delombok/Helper.java @@ -1,15 +1,18 @@ class HelperTest { - void test() { - class H1 { - void foo() { - System.out.println("Hello"); + { + final int z = 5; + if (Boolean.TRUE) { + class H1 { + void foo(int x) { + System.out.println("Hello, " + (x + z)); + } } - } - final H1 $H1 = new H1(); - $H1.foo(); - class H2 { - void bar() { - $H1.foo(); + final H1 $H1 = new H1(); + $H1.foo(10); + class H2 { + void bar() { + $H1.foo(12); + } } } } diff --git a/test/transform/resource/after-ecj/Helper.java b/test/transform/resource/after-ecj/Helper.java index 1b4e8bd2..44c2a171 100644 --- a/test/transform/resource/after-ecj/Helper.java +++ b/test/transform/resource/after-ecj/Helper.java @@ -1,26 +1,30 @@ import lombok.experimental.Helper; class HelperTest { + { + final int z = 5; + if (Boolean.TRUE) + { + @Helper class H1 { + H1() { + super(); + } + void foo(int x) { + System.out.println(("Hello, " + (x + z))); + } + } + final H1 $H1 = new H1(); + $H1.foo(10); + @Helper class H2 { + H2() { + super(); + } + void bar() { + $H1.foo(12); + } + } + } + } HelperTest() { super(); } - void test() { - @Helper class H1 { - H1() { - super(); - } - void foo() { - System.out.println("Hello"); - } - } - final H1 $H1 = new H1(); - $H1.foo(); - @Helper class H2 { - H2() { - super(); - } - void bar() { - $H1.foo(); - } - } - } } diff --git a/test/transform/resource/before/Helper.java b/test/transform/resource/before/Helper.java index 145d740f..cec9c7ce 100644 --- a/test/transform/resource/before/Helper.java +++ b/test/transform/resource/before/Helper.java @@ -1,18 +1,21 @@ import lombok.experimental.Helper; class HelperTest { - void test() { - @Helper class H1 { - void foo() { - System.out.println("Hello"); + { + final int z = 5; + if (Boolean.TRUE) { + @Helper class H1 { + void foo(int x) { + System.out.println("Hello, " + (x + z)); + } } - } - - foo(); - - @Helper class H2 { - void bar() { - foo(); + + foo(10); + + @Helper class H2 { + void bar() { + foo(12); + } } } } diff --git a/test/transform/resource/messages-delombok/Helper.java.messages b/test/transform/resource/messages-delombok/Helper.java.messages index 05260c0b..bf780b03 100644 --- a/test/transform/resource/messages-delombok/Helper.java.messages +++ b/test/transform/resource/messages-delombok/Helper.java.messages @@ -1 +1 @@ -13 No methods of this helper class are ever used.
\ No newline at end of file +15 No methods of this helper class are ever used.
\ No newline at end of file diff --git a/test/transform/resource/messages-ecj/Helper.java.messages b/test/transform/resource/messages-ecj/Helper.java.messages index 7207e136..4193dfe2 100644 --- a/test/transform/resource/messages-ecj/Helper.java.messages +++ b/test/transform/resource/messages-ecj/Helper.java.messages @@ -1 +1 @@ -13 No methods of this helper class are ever used. +15 No methods of this helper class are ever used. |