eclipse - 如何使 Eclipse Formatter 不破坏注释掉的代码?

我的很多同事都喜欢留下注释掉的代码,如何使 Eclipse Formatter 不破坏该代码的格式(现在它会生成一个大块或 block )。

附:我知道我可以以某种方式将格式化程序配置为忽略该代码,我做过一次,但我不记得如何了。

最佳答案

在 Eclipse Formatter Settings (Preferences/Java/Code Style/Formatter) 选项卡中的 Comments 取消选中复选框“Enable Block Comment Formatting”和“Enable Line Comment Formatting”这些都应该被禁用。

https://stackoverflow.com/questions/4606699/

相关文章:

javascript - 并非所有浏览器都支持 toLocaleString()?

python - python 3中的字符串拆分格式

ide - 为什么 IDE 不支持动态格式化?

formatting - 如何使用 LaTeX 以实用程序员系列丛书的风格格式化源代码列表?

c# - microsoft.interop.excel 格式化单元格

r - 更改 R DataTables (DT) 中的字体大小

android - 在 EditText 中自动格式化电话号码

io - Fortran 将我的输出添加到星号 - 为什么?

c++ - ostream showbase 不显示 "0x"为零值

postgresql - 我可以在 PostgreSQL 中获得 CSV header 但没有行数吗