Home  >  Q&A  >  body text

eclipse 大块注释 折叠

在写代码时,会遇到需要暂时注释掉一部分代码,又不能删除这些注释。如果注释掉很多行,看起来很不爽,请问怎样将大块的注释折叠起来?我知道在C#中可以通过#region #endregion的功能。

伊谢尔伦伊谢尔伦2710 days ago1000

reply all(4)I'll reply

  • ringa_lee

    ringa_lee2017-04-24 09:12:05

    Found a way. The plug-in com.cb.eclipse.folding_1.0.6.jar is required. (Usage is very simple, use Baidu by yourself)
    The effect is Auntie Jiang’s:
    Open:

    Collapse:

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-24 09:12:05

    ctrl+.? Can you try it?

    reply
    0
  • PHP中文网

    PHP中文网2017-04-24 09:12:05

    It's very simple, click the "little minus sign" on the left to collapse it.

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-24 09:12:05

    Eclipse shortcut keys:

    • Ctrl + Shift + /: Folding code;

    • Ctrl + Shift + *: Expand code;

    reply
    0
  • Cancelreply