Cannot remove block comment in Eclipse after formatting

后端 未结 5 1677
野趣味
野趣味 2020-12-15 16:22

Eclipse\'s automatic formatter changes block comments such that the Source > Remove Block Comment does not completely remove the block comment. Source > Add Block Comment ad

5条回答
  •  -上瘾入骨i
    2020-12-15 17:07

    I've run into this problem before and my solution is just to use line comments (//) generated by Eclipse instead of block comments. Select code, and then hit Ctrl-/ or Ctrl-7 to toggle // for every line selected. After formatting, those lines will get indented and formatted like text, but if you remove the comments (Ctrl-/ or Ctrl-7) and reformat, everything works fine.

提交回复
热议问题