Formatting & Highlighting of Javadoc Comments

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.


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.

Posted by guest on January 30, 2012 at 09:02 AM PST #

So then you can disable it, right?

Posted by Geertjan on January 30, 2012 at 02:23 PM PST #

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.

Posted by jiai on January 31, 2012 at 04:36 AM PST #

Very useful, thank you

Posted by guest on August 22, 2013 at 12:02 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.


« May 2016