Eclipse使用google代码风格格式化

2021-08-12  本文已影响0人  不需要什么就能清醒

谷歌代码格式化下载地址:https://github.com/google/styleguide
如图:

image.png
下载下来以后在eclipse中导入Google代码风格
Window==>Preferences==>Java==>Code Style==>Formatter
image.png
导入成功即可。
另外注释不需要被格式化的可以取消注释格式化
在Eclipse里设置格式化代码时不格式化注释
Windows ==> Preferces ==> java ==> Code Style ==> Formatter 或者搜索Formatter
编辑Edit 进入Comments选项卡
取消勾选“Enable Javadoc comment formatting”.
image.png
上一篇 下一篇

猜你喜欢

热点阅读