1

When I am figuring out someone's code in NetBeans, it occurred to me I could use a feature to mark code as 'understood', or 'suspicious', etc. while going through it. Is there any way to manually highlight or format code in NetBeans, the way it is done in Word? Some plugin maybe?

The alternative, i guess, is adding short comments everywhere, which is often not too convenient.

4

2 回答 2

0

当您通过 XMPP 服务器共享代码或与某人讨论代码时,Netbeans Collab插件对于共享代码和着色它们非常有用。您可以使用它来与自己交谈并为要评论的部分着色。

于 2011-09-16T12:04:10.423 回答
0

您可以用editor-fold. 要快速做到这一点:

  1. 选择要包围的代码部分
  2. Alt + Enter
  3. Surround with // <editor-fold defaultstate="collapsed" desc="comment">...从提示弹出窗口中选择
  4. 输入您的标签,即。“明白了”
  5. 按回车

这将为您提供一段可折叠的代码,折叠后将仅显示您为comment属性输入的标签。

于 2011-11-15T05:59:03.810 回答