Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable formatting for JavaDoc in IntelliJ IDEA

Tags:

I want to use style of JavaDoc:

/**
 * Description.
 *
 * @param param1     parameter description
 * @param param2     parameter description
 * @return           return description.
 * @throws exception exception description.
 */

How you can see I want to use align to right description of parameters, returns and exceptions.

This style used at http://www.oracle.com/technetwork/articles/java/index-137868.html

So, my question: how I can configured that style in IDEA 2016.x.x or how I can disable formatting for javaDoc without using specific comments //@formatter:off and //@formatter:on, if this possible?

Of course it's not serious and critical problem, but I am interest, because it's bad situation when developer can't set-up style by official documentation without any specific comment. I believe that i am wrong)

PS: I have tried off formatting at File->Settings->Editor->Code Style->Java->JavaDoc, Enable JavaDoc formatting to off (and playing with all settings at this section). And my alignment on JavaDoc resets on Ctrl-Alt-L

Thanks for feedback!

like image 250
Alexey Nikitenko Avatar asked Nov 03 '16 19:11

Alexey Nikitenko


Video Answer


1 Answers

Doesn't the "Align parameter descriptions" setting do this automatically? Screenshot right after applying setting

like image 77
Andrew Dant Avatar answered Oct 03 '22 19:10

Andrew Dant