lombok

eclipse2021-06版本使用lombok

星期五, 八月 13th, 2021 | JAVA-and-J2EE | 没有评论

Eclipse IDE for Enterprise Java and Web Developers (includes Incubating components)

Version: 2021-06 (4.20.0)
Build id: 20210612-2011

(c) Copyright Eclipse contributors and others 2000, 2021. All rights reserved. Eclipse and the Eclipse logo are trademarks of the Eclipse Foundation, Inc., https://www.eclipse.org/. The Eclipse logo cannot be altered without Eclipses permission. Eclipse logos are provided for use under the Eclipse logo and trademark guidelines, https://www.eclipse.org/logotm/. Oracle and Java are trademarks or registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

This product includes software developed by other open source projects including the Apache Software Foundation, https://www.apache.org/.

Lombok v1.18.20 “Envious Ferret” is installed. https://projectlombok.org/

上面是安装完成的版本信息

1.Lombok v1.18.20 下载 当前最新版本 https://projectlombok.org/

2. java -jar lombok.jar

3.安装完毕检查eclipse.ini下配置(需要自行添加–illegal-access=permit)使用jdk16出现的问题

-javaagent:/Applications/Eclipse.app/Contents/Eclipse/lombok.jar
--illegal-access=permit

4.重启eclipse可以正常使用

Tags: ,

Lombok注解的类在eclipse下寻找getter/setter调用的办法

星期一, 十一月 2nd, 2020 | JAVA-and-J2EE | 没有评论

现在用Lombok已经是很普遍了,这里不去争好不好用,只解决个人遇到的不方便之处.

stackoverflow上对应的解决方法原文地址:

https://stackoverflow.com/questions/42644923/eclipse-with-lombok-search-for-getter-and-setter-usages

1.在面板处开启 outline 的选项,可以看到对应的 get和set方法,已经支持 @Setter 和@Getter 、@Data注解

2.右键 选择 “Open Call Hierarchy” 即可看到调用的情况

3.图示如下:

Right-click on the method in the Outline view, and use “Open Call Hierarchy”.

An other way to do it is to right-click on the annotation (@Setter for instance), and use “Open Call Hierarchy” on it

Tags:

Search

相关文章

文章分类

Links

Meta