View lombok generated code in IntelliJ IDEA

泄露秘密 提交于 2019-12-04 15:07:58

问题


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.


回答1:


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




回答2:


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

java -jar lombok.jar delombok -p MyJavaFile.java


来源:https://stackoverflow.com/questions/36526286/view-lombok-generated-code-in-intellij-idea

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!