Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does the default IntelliJ default class javadoc comment use non-standard syntax?

Why does the default IntelliJ default class javadoc comment use non-standard syntax? Instead of creating a line with "User: jstauffer" it could create a line with "@author jstauffer". The other lines that it creates (Date and Time) probably don't have javadoc syntax to use but why not use the javadoc syntax when available?

For reference here is an example:

/**  * Created by IntelliJ IDEA.  * User: jstauffer  * Date: Nov 13, 2007  * Time: 11:15:10 AM  * To change this template use File | Settings | File Templates.  */
like image 570
James A. N. Stauffer Avatar asked Sep 15 '08 15:09

James A. N. Stauffer


People also ask

How do I set default comments in IntelliJ?

Add a new commentType /** before a declaration and press Enter . The IDE auto-completes the doc comment for you. For information on how to disable this feature, refer to Disable automatic comments.

How do I write Javadoc in IntelliJ?

put the cursor on the method name you want to add javadoc ,and then press alt + enter, there will be an add javadoc option in the popup. If the method already has a javadoc,then there will be no add javadoc option.

How do I open Javadoc in IntelliJ?

Use View | Quick Documentation or the corresponding keyboard shortcut (by default: Ctrl + Q on Windows/Linux and Ctrl + J on macOS or F1 in the recent IDE versions).

How do I create a comment in IntelliJ?

Create JSDoc commentsPosition the caret before the declaration of the method/function or field to document, type the opening block comment /** , and press Enter . IntelliJ IDEA generates a JSDoc comment with a list of parameters ( @param ) and return values ( @returns ), where applicable.


1 Answers

I'm not sure why Idea doesn't use the @author tag by default.

But you can change this behavior by going to File -> Settings -> File Templates and editing the File Header entry in the Includes tab.

As of IDEA 14 it's: File -> Settings -> Editor -> File and Code Templates -> Includes -> File Header

like image 194
Rob Dickerson Avatar answered Sep 23 '22 23:09

Rob Dickerson