Questions tagged [intellij-lombok-plugin]

A plugin for using Lombok with IntelliJ IDEA.

The IntelliJ Lombok Plugin is a plugin for IDEA. It provides support for which is a project which aims to reduce boilerplate code.

Refernces:

153 questions
2
votes
1 answer

Lombok Annotations are not working with inheritance

I have something like a parent class (File A.java). Every class is extending this class, as every class needs name. When I use in File X.java the @With function, it works for the .withDescription("xxx") which is part of File B.java. But it's not…
Joergi
  • 1,527
  • 3
  • 39
  • 82
2
votes
1 answer

Optional with Lombok custom build method says non-static variable cannot be referenced

Given the following code. @Getter @Builder(builderClassName = "Builder", buildMethodName = "build") public final class BusinessEvent implements BusinessPayload { private String action, duration, outcome, provider, trackId, sequence; …
user3139545
  • 6,882
  • 13
  • 44
  • 87
2
votes
1 answer

Is it possible to use IntelliJ's 'Analyze Data Flow to Here' feature with Java Lombok?

I have recently done an experiment to see how we can use Lombok to reduce boilerplate in our code. The issue: When creating a simple data class with a builder through Lombok annotations, in IntelliJ IDEA, I cannot right click a field, then select…
2
votes
2 answers

Using direct field access instead of getters in a copy constructor leads to null pointer exception

It must be Java 101 but I can't figure why I can't use direct field access and why I'm forced to use getters in a copy constructor. I have a bunch of entities. They are organised like a tree. Linked entities are fetched eagerly. I'm using…
2
votes
2 answers

IntelliJ IDEa 2018.2 highlights var lambda parameter as error using JDK 11

Tested on Oracle JDK 11 and latest (as of now) available version of IntelliJ IDEa (IntelliJ IDEA 2018.2.4). Project language level is Java 11. Code public static void main(String[] args) { System.out.println(List.of("AAA", "BBB", "CCC") …
2
votes
2 answers

Java: Generate Per Member Equals Possibly With Lombok or Intellij IDEA?

Is there any generator that helps with the following topic: In a java class, I have a member attribute: private String attribute1; I want to have a generator or something similar, that helps me to have these lines of code: public boolean…
user7450524
2
votes
1 answer

lombok @ExtensionMethod: cannot resolve method

I've added this class: public class StringExtensions { public static String makeMusical( String in ) { return "1"; } } @ExtensionMethod({StringExtensions.class}) public class App { public static void main(String[] args) { String a =…
roman
  • 607
  • 2
  • 10
  • 18
2
votes
5 answers

intellij idea 15.0 cannot see lombok annotations

I've upgraded my IntelliJ Idea to v. 15.0 Lombok plugin is installed and enabled, annotation processing is also enabled. But compiler still doesn't see annotations. What are possible solutions for this problem?
2
votes
1 answer

Fluent getters generate errors

I have a project with the following lombok.config file: lombok.accessors.chain = true lombok.accessors.fluent = true So the following class should compile fine: @Data class A { private int i; public static void main(String[] args) { new…
assylias
  • 321,522
  • 82
  • 660
  • 783
1
vote
2 answers

Downloaded Maven Dependencies (BUILD SUCCESS) But Can't Resolve Lombok In IntelliJ

My project builds successfully with mvn clean install -U, but when building the same project in IntelliJ I get java: package lombok.extern.sl.. does not exist. I have the lombok plugin installed but it can't recognize it. When trying to run test…
1
vote
0 answers

Lombok @SuperBuilder: Cannot find symbol

I have included @SuperBuilder for super class and all subclasses: @NoArgsConstructor @AllArgsConstructor @Data @SuperBuilder public abstract class Aggregator { private MyEnum myEnum; private MyPackage pck; private String…
EzyHoo
  • 301
  • 2
  • 14
1
vote
1 answer

How can I navigate to Lombok generated implementations

I'm wondering if it would be possible to navigate directly to the methods generated by Lombok using Intellij IDEA. For instance, for this given example: @Builder public class AClass { private String body; } trying to go to the implementation of…
thmasker
  • 406
  • 1
  • 9
  • 21
1
vote
1 answer

How to have lombok plugin in intellij 2021

Well i would like to have lombok for my project that im trying to build , however the Intellij IDEA 2021.3.4 doesn't include it or i dont know how to include it . Is there a workaround to include lombok into the Intellij IDEA. Thanks a lot in…
Bryan
  • 63
  • 1
  • 7
1
vote
1 answer

Make lombok builder implement interface for 2 classes with common fields

Let's say I have an interface and 2 classes like this: public interface FinancialTransactionBuilder { FinancialTransactionBuilder cost(int cost); FinancialTransactionBuilder dateOfPurchase(Date date); FinancialTransactionBuilder…
SomeGuy
  • 1,702
  • 1
  • 20
  • 19
1
vote
1 answer

how can I add lombok jar into intellij idea without installing plugin?

I was working on a spring boot project using eclipse. I'm trying to shift to intellij idea but there is lombok jar that our project uses. Due to restrictions from network connection I can't download and install lombok plugin. I can able to connect…