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 4.1k times
70
-
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
-
2Not 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
3 Answers
95
Just in case somebody ends up looking for an answer here. With lombok plugin starting with v0.8.6 it is possible.
jjd
- 2,015
- 1
- 19
- 30
-
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
-
12Just 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
-
13
Lombok comes with a 'delombok' feature that you an use as follows:
java -jar lombok.jar delombok -p MyJavaFile.java
Rajesh Kolappakam
- 1,999
- 13
- 12
-
5Very 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
6
Find generated class in folder target/././classname.class and open it in IntelliJ IDEA.
Vasily Pudikov
- 61
- 1
- 1
-
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
-
Actually this is what I'm looking for. @Vasily Pudikov, you got my up vote. :) – Louis Oct 12 '21 at 21:39