Home > Mobile >  IntelliJ: How to keep short one-line JavaDoc multiline?
IntelliJ: How to keep short one-line JavaDoc multiline?

Time:12-15

I am trying to set up my IntelliJ IDE for JavaDoc. The problem I am facing is, the format code button keep changing my short multiline JavaDoc to one line JavaDoc.

For example:

/**
 * Shot description
 */

is formatted to

/** Short description */

For our company code style, we want to keep it multi-line even when the description is short. I cannot find the correct setting in IntelliJ to stop it from changing it. (I do see the option of "Do not wrap one line comments" but checking it doesn't help on this situation -- my comment still got changed to one-line.

Is there a way to stop IntelliJ from doing so? Thank you!

CodePudding user response:

Settings (Preferences on macOS) | Editor | Code Style | Java | JavaDoc | Other | Do not wrap one line comments.

do not wrap

  • Related