Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

View lombok generated code in IntelliJ IDEA

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.

like image 692
Mike Sweeney Avatar asked Apr 10 '16 05:04

Mike Sweeney


People also ask

How do I check my Lombok generated class?

Find generated class in folder target/././classname. class and open it in IntelliJ IDEA.

Does IntelliJ come with Lombok?

As of IntelliJ version 2020.3, we don't need to configure the IDE to use Lombok anymore. The IDE comes bundled with the plugin. Also, the annotation processing will be enabled automatically.


2 Answers

enter image description here

Just in case somebody ends up looking for an answer here. With lombok plugin starting with v0.8.6 it is possible.

like image 200
jjd Avatar answered Sep 23 '22 13:09

jjd


Lombok comes with a 'delombok' feature that you an use as follows:

java -jar lombok.jar delombok -p MyJavaFile.java 
like image 41
Rajesh Kolappakam Avatar answered Sep 23 '22 13:09

Rajesh Kolappakam