New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eclipse constructor generation not in class body #228

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

Comments

Projects
None yet
1 participant
@lombokissues
Collaborator

lombokissues commented Jul 14, 2015

Migrated from Google Code (issue 155)

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

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

Collaborator

lombokissues commented Jul 14, 2015

👤 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

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

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.

Collaborator

lombokissues commented Jul 14, 2015

👤 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

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

👤 r.spilker   🕗 Nov 07, 2010 at 14:18 UTC

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

Collaborator

lombokissues commented Jul 14, 2015

👤 r.spilker   🕗 Nov 07, 2010 at 14:18 UTC

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

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

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.

Collaborator

lombokissues commented Jul 14, 2015

👤 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

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

End of migration

Collaborator

lombokissues commented Jul 14, 2015

End of migration

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