I have the lombok plugin setup in IntelliJ and my code builds fine. I can see the lombok generated methods in the structure view. What I want is some way to actually see the source lombok generates for each of the methods. I realize I can delombok the file but I'm wondering if there is some way I can flip a switch to show or hide the lombok generated code.
Asked
Active
Viewed 5.4k times
90
-
1http://stackoverflow.com/questions/29980133/intellij-idea-cannot-see-lombok-generated-code – anfab May 04 '16 at 09:37
-
Take a look at this answer. http://stackoverflow.com/a/29982184/636904 – zudduz Mar 14 '17 at 17:32
-
3Not sure how that addresses the question. I was hoping to see the generated source inline in the source file. – Mike Sweeney Mar 15 '17 at 02:48
-
did you find anything as of now? – ch1ll Mar 09 '23 at 13:56
4 Answers
107
Just in case somebody ends up looking for an answer here. With lombok plugin starting with v0.8.6 it is possible.

jjd
- 2,158
- 2
- 18
- 31
-
thanks jjd. what would be very helpful to know is that would re-Lomboking using the above plugin options, just revert the class to what it was...cause the Lomboking options all start with Default...I dont want to change the class from a bespoke Lombok to a default lombok...sorry I am a lombok newbie. – Beezer Jul 17 '17 at 10:15
-
13Just look at the expanded menu right under the one shown, i.e. `Delombok`. That's what you're looking for. – swalog Oct 06 '17 at 08:17
-
4
17
Find generated class in folder target/././classname.class and open it in IntelliJ IDEA.

Vasily Pudikov
- 171
- 1
- 2
-
From Review: The question is about a solution for seeing the lombok generated code inline in the original source file in that project. – sɐunıɔןɐqɐp Jun 29 '21 at 10:01
-
4Actually this is what I'm looking for. @Vasily Pudikov, you got my up vote. :) – Louis Oct 12 '21 at 21:39
15
Lombok comes with a 'delombok' feature that can be used as follows:
java -jar lombok.jar delombok -p MyJavaFile.java

Fede Garcia
- 677
- 11
- 18

Rajesh Kolappakam
- 2,095
- 14
- 12
-
7Very aware of that as mentioned in the question. I'm looking for something in the IDE where I can flip a toggle or something and see the lombok generated code inline in the original source file in my project. – Mike Sweeney Mar 17 '17 at 03:59
1

Joseph Cass
- 119
- 1
- 3
-
This may be of value as another question, but the OP has made it very clear that this is not what is being asked here. – Paul Galbraith Jun 03 '23 at 20:29