Lombok-intellij-plugin: Idea cannot generate another constructor when @NoArgsConstructor is used

Created on 19 Oct 2015  路  8Comments  路  Source: mplushnikov/lombok-intellij-plugin

Assuming we have a class:

@NoArgsConstructor
public class NoArgsConstructorTest {

    private String field;

}

Try to generate a constructor with field argument (Code -> Generate -> Constructor). Error message Constructor already exists appears.

image

If you execute the same action with manually written no-args constructor, Idea opens a dialog to select fields to initialize in a new constructor:

image

bug

Most helpful comment

still an issue 0.28-2019.3

All 8 comments

An issue, for now you can either type yourself or use @AllArgsConstructor

Btw, I believe the following issue is also related to this.

When one has a class with @Getter:

public class GetterTest {

    @Getter
    private String filed;

}

and tries to generate a constructor, Idea inserts the no-args one without a dialog to choose fields to initialize in a constructor.

I hope, I found a cause of the problem. Fix should be available in the next release.

Great, thank you! Looking forward to the new release :)

Pluginversion with changes for this issue was released today

I've checked the new plugin version, this problem is not reproducible, code generation is working as usual.
Thank you for the fix!

This is again an issue with Version: 0.11.16

still an issue 0.28-2019.3

Was this page helpful?
0 / 5 - 0 ratings