Geertjan's Blog

  • January 30, 2012

Formatting & Highlighting of Javadoc Comments

Geertjan Wielenga
Product Manager

Here's a completely new set of options in NetBeans IDE 7.1 for javadoc comments:

Wrapping the javadoc comments to justify them with the right editor margin is now also possible, so this very popular issue is now fixed:


The entire tab that you see above is new in 7.1. This new feature is also mentioned in the New & Noteworthy for NetBeans IDE 7.1.

Join the discussion

Comments ( 4 )
  • guest Monday, January 30, 2012

    First time I hit ALT+SHIFT+F this "feature" messed up all my comments...

    When you have an internal code-commenting block which is aligned with very indented code it wraps it very badly (it should count 80 chars from the asterisk, not from the beginning of the line) and I end up with a comment block 2 words wide and dozens of lines long.

    It shouldn't have been wrapped at all: comments described the meaning of bits in a custom datagram (all nicely formatted with ascii bars).

    I think that only comments marked with a special symbol (or contained in a <p></p> paragraph) should be wrapped! Everything else: please no!

    I do not like this "feature" at all.

  • Geertjan Monday, January 30, 2012

    So then you can disable it, right?

  • jiai Tuesday, January 31, 2012

    I think the formatting is a bit overdone: If you are using tags (i.e. the code tag) in a comment, the opening tag is wrapped to a new line. That makes the text difficult to read in source code.

  • guest Thursday, August 22, 2013

    Very useful, thank you

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.