Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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

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

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

/** 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!

>Solution :

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

do not wrap

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading