Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

<p/> tag in Javadoc in IntelliJ / Android Studio

There is the small tag which is created at some places if I reformat the code in Android Studio and other Jetbrains products as well.

How can I prevent that?

enter image description here

like image 548
Marian Klühspies Avatar asked Feb 19 '14 16:02

Marian Klühspies


People also ask

What does P mean in Javadoc?

Your use of <P> to separate paragraphs will be in line with the rest of the Javadoc output.

Can you use HTML tags in Javadoc comments?

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.

What are Javadoc tags?

The javadoc TagsRepresents the relative path to the generated document's root directory from any generated page. Adds a comment indicating that this API should no longer be used. Adds a Throws subheading to the generated documentation, with the classname and description text.


1 Answers

The <p/> tag is generated on empty lines so that they are shown in the javadocs.

If you want to, you can turn this off when you reformat the code.

In Android Studio, go to File -> Settings -> Code Style -> Java -> JavaDoc tab -> Uncheck Generate "<p/>" on empty lines

Where to turn off generation of the p tag

Here is what the documentation will look like with and without the paragraph tag, where on the right is the text from the quick docs window.

Example of the docs with and without p tag.

Just take that into consideration.

like image 177
singularhum Avatar answered Sep 21 '22 23:09

singularhum