xenoterracide
xenoterracide

Reputation: 16857

Is there anyway in Idea to recognize a getter/setter generated by lombok in the same module

intellj errorSo looking at my class files the getters/setters are being generated just fine, but I'm trying to write a copy method that looks like this in the same jar.

@Data
public class SoftwareVersions {
    private String applicationVersion;

    void copyTo( MonitorFoleyConnection mfc ) {
        mfc.setApplicationVersion( applicationVersion );
    }
}

in gradle

    annotationProcessor("org.projectlombok:lombok:1.+")
    compileOnly("org.projectlombok:lombok:1.+")

annotation processor settings

is it possible to get intellij to recognize the existance of this method?

Upvotes: 3

Views: 232

Answers (1)

Fabiano
Fabiano

Reputation: 1413

Yes, you have. You just need to do two things:

  1. Install the Lombok Plugin for Intellij:

Lombok Plugin

  1. Enable the annotation processing:

Annotation Processing

Upvotes: 2

Related Questions