Is there a way to modify the template IntelliJ uses for a method's Javadoc?
In particular, I want my javadoc comments to look like this:
/******************** * * Comment here * *********************/
However, when I reformat the code, the javadoc ends up looking like this:
开发者_开发问答/** * ****************** * * Comment here * ******************** */
It doesn't seem like you want JavaDoc comments then, as they are defined to look like how IntelliJ is making them.
- Format of a Doc Comment
- Structure of a JavaDoc comment
You can disable JavaDoc formatting:
- Settings > Project Settings > Code Style > JavaDoc
- Uncheck
Enable JavaDoc formatting
This way, you can have your multi-line comments not get reformatted as JavaDoc comments. IntelliJ is identifying them (correctly) as JavaDoc comments since they have two asterisks.
You can also change them to regular multi-line comments (not JavaDoc comments) by adding a space before the second asterisk (e.g. /* ****************
), which should also have IntelliJ not reformat them.
精彩评论