Search code examples
javaintellij-ideajavadoc

Autoindent JavaDoc for the return tag using Intellij IDEA 2016.2.4


How can I set my IDEA to autoindent the whole sentence for the return tags? The IDE only autoindents the first line but ignores the following ones. Therefore checkstyle points me to this line being indented not correctly.

When I use four tabs to indent the line the checkstyle message disappears but after I reformat code with Ctrl+Alt+L the tab chars are removed and I again get the same message. I didn't found any settings for the return tag in File > Settings > Editor > Code Style > Java > JavaDoc tab.


Solution

  • Current IntelliJ-IDEA (2022.2) has a setting for this. I used it to successfully get rid of the CheckStyle error. Under Settings > Editor > Code Style > Java > JavaDoc tab, the node Other > Indent continuation lines, just activate that CheckBox.