参考:https://www.cnblogs.com/yongh/articles/9238760.html

 

问题:在使用shift+ctrl+F格式化代码的时候会出现以下的情况,注释也会格式化,把写在一行的注释分为两行显示,可读性不高而且格式不友好。

  不友好的格式:

eclipse 格式化代码时注释不换行

  实际需要的格式:

eclipse 格式化代码时注释不换行

问题解决:

进入window-->preferences-->java-->code style-->formatter创建不需要格式化注释的模板

eclipse 格式化代码时注释不换行

 

 

eclipse 格式化代码时注释不换行

 

相关文章:

  • 2022-02-07
  • 2021-07-19
  • 2021-09-24
  • 2021-08-08
  • 2021-10-03
  • 2022-02-07
猜你喜欢
  • 2021-10-07
  • 2021-12-31
  • 2021-11-03
  • 2021-03-28
  • 2021-05-08
  • 2021-06-09
  • 2022-01-19
相关资源
相似解决方案