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.

Ognjen
  • 2,508
  • 2
  • 31
  • 47

2 Answers2

0

The Netbeans Collab plugin was pretty useful to share code and color them when you are sharing it through an XMPP server or discussing the code with someone. You could use that to talk to yourself and color parts that you want to comment on.

sunbiz
  • 193
  • 2
  • 6
0

You could surround sections of code with an editor-fold. To quickly do this:

  1. Select the section of code you want surrounded
  2. Press Alt + Enter
  3. Select Surround with // <editor-fold defaultstate="collapsed" desc="comment">... from the hints popup
  4. Enter your tag ie. "understood"
  5. Press enter

This will give you a collapsible section of code that when collapsed will only show the tag that you've entered for the comment attribute.

Jonathan Spooner
  • 7,682
  • 2
  • 34
  • 41