Search code examples
intellij-ideajavadocintellij-14

How to keep IntelliJ IDEA from rearranging javadoc tags?


/**
 * Comment.
 *
 * <p>Hello
 *
 * @author me ([email protected])
 * @version $Id$
 * @since 0.1
 * @checkstyle ClassDataAbstractionCoupling (500 lines)
 * @checkstyle ClassFanOutComplexity (500 lines)
 */

When I reformat my code with Ctrl+Alt+L, the @since is placed after the @checkstyle tags. Is there any way to disable javadoc tag rearrangement on code reformatting?


Solution

  • You can uncheck Enable JavaDoc formatting in Settings/Code Style/Java/JavaDoc, which should fix the problem.

    IntelliJ IDEA settings

    However this means that no other formatting will be performed (wrapping, alignining, etc). I haven't found a way to disable just the rearranging of tags.