Eclipse constructor generation not in class body #228

Closed
lombokissues opened this Issue Jul 14, 2015 · 5 comments

Projects

None yet

1 participant

@lombokissues
Collaborator

Migrated from Google Code (issue 155)

@lombokissues
Collaborator

๐Ÿ‘ค koen.verrecken ย  ๐Ÿ•— Oct 29, 2010 at 12:09 UTC

Using Source -> Generate Constructor using fields... in Eclipse will generate the constructor on top of the java class instead of the body when another constructor already exists.

For instance, take this java class that already contains a default constructor:

@ Data
public class SomeClass {
private String field;
public SomeClass() {

}
}

Generating another constructor with the field as parameter will yield:

@ Data
public SomeClass(String field) {
super();
this.field = field;
}
public class SomeClass {
private String field;
public SomeClass() {

}

}

The constructor should appear in the body of the class which is not the case.

Lombok version : 0.9.3
Eclipse version : Helios
JDK : 1.6.0_16

@lombokissues
Collaborator

๐Ÿ‘ค r.spilker ย  ๐Ÿ•— Oct 29, 2010 at 12:11 UTC

Hi Koen, this is a known problem which we will fix in an upcoming version.

@lombokissues
Collaborator

๐Ÿ‘ค r.spilker ย  ๐Ÿ•— Nov 07, 2010 at 14:18 UTC

Fixed in 2097dd8. Will be in 0.9.4 "Burning Emu"

@lombokissues lombokissues added this to the 0.9.4 milestone Jul 14, 2015
@lombokissues
Collaborator

๐Ÿ‘ค grootjans ย  ๐Ÿ•— Jul 02, 2012 at 21:26 UTC

Rolled back the changed made for this issue. The issue could no longer be reproduces, with the 0.9.3. version on Eclipse versions 3.6 or higher. The fix however, introduced issue #450.

@lombokissues
Collaborator

End of migration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment