Javadoc: line breaks without HTML-tags?

java.is.for.desktop picture java.is.for.desktop · Feb 22, 2011 · Viewed 93.4k times · Source

Sorry for a probable FAQ kind of question, but I just can't find the answer.

As far as I remember Eclipse, a blank line in a Javadoc comment is displayed (in in-source Javadoc popups) as a line break (with extra vertical spacing).

In Netbeans, however, this is not the case.

Can I configure Javadoc to interpret a blank line as a line break?

Additional question: Can I override default Netbeans behavior (related to this) for in-source Javadoc popups?

What I'm talking about is:

Source

/**
 * Paragraph One
 *
 * Paragraph Two
 */
 void someMethod() { }

Eclipse interpretation

 Paragraph One

 Paragraph Two

Netbeans interpretation

 Paragraph One Paragraph Two

Answer

Marquis of Lorne picture Marquis of Lorne · Feb 22, 2011

It has nothing to do with Netbeans. I suspect you are looking at the source code in one case and the output of Javadoc in the other case. Newlines are not significant in HTML: ergo the output will not show them. If you want a newline use a <p> or a <br>.