Eclipse-设置格式化代码时不格式化注释

来源:互联网 发布:linux man help 编辑:程序博客网 时间:2024/05/22 10:54

在Eclipse里设置格式化代码时不格式化注释

今天格式化代码 发现直接format会把注释也一块格式化了,有时候会把好好的注释弄的很乱。甚为头疼。

查阅之后解决办法如下:

Windows -> Preferces -> java -> Code Style –> Formatter 或者搜索Formatter

编辑Edit 进入Comments选项卡

取消勾选“Enable Javadoc comment formatting”.

搞定。以后就不会格式化注释了。