How to comment a block in Eclipse?

前端 未结 17 2121
一整个雨季
一整个雨季 2020-12-07 08:52

Does Eclipse have a hot key to comment a block? and to uncomment a block?

17条回答
  •  旧巷少年郎
    2020-12-07 09:16

    Using Eclipse Mars.1 CTRL + / on Linux in Java will comment out multiple lines of code. When trying to un-comment those multiple lines, Eclipse was commenting the comments. I found that if there is a blank line in the comments it will do this. If you have 10 lines of code, a blank line, and 10 more lines of code, CTRL + / will comment it all. You'll have to remove the line or un-comment them in blocks of 10.

提交回复
热议问题