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:
/** * Paragraph One * * Paragraph Two */ void someMethod() { }
Paragraph One Paragraph Two
Paragraph One Paragraph Two
There are no real restrictions on the use of HTML in Javadoc comments. The Javadoc documentation states: Comments are written in HTML - The text must be written in HTML, in that they should use HTML entities and can use HTML tags.
The <br> HTML element produces a line break in text (carriage-return). It is useful for writing a poem or an address, where the division of lines is significant.
If you want to start a line with the @ character and not have it be interpreted, use the HTML entity @. This implies that you can use HTML entities for any character that you would need to escape, and indeed you can: The text must be written in HTML with HTML entities and HTML tags.
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>
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With