How do I configure IntelliJ to insert <p> tags into existing javadoc?

I have configured my Android studio (IntelliJ) to insert <p> characters on empty newlines in javadoc by checking the box in Preferences > Code Style > Java > JavaDoc.

However, when I apply my formatter to my existing codebase ( Code > Reformat Code...

), the <p> tags are not inserted.

My question is, how do I get the IDE to successfully apply formatting for javadoc newline <p> tokens?

+3


source to share


1 answer


If you have JavaDoc:

/**
 * Text
 *               <- no tag will be added here
 * @author foo
 */

      

The tag <p/>

will not be inserted between Text

and @author

because there will be no target there. Tags will only be inserted between the description lines (first part of JavaDoc):



/**
 * Text 1
 *               <- <p/> will be inserted on this line after reformat
 * Text 2
 *               <- no tag will be inserted here
 * @author foo
 */

      

I'm not sure if this is the problem you are facing. Let me know in the comments if it works for you with a multi-line description like the second example, or if it doesn't work at all.

0


source







All Articles