views:

714

answers:

4

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.
 */
+2  A: 

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 "Inculdes" tab.

Rob Dickerson
+2  A: 

The default is readable, usable, but does not adhere to or suggest any coding standard.

I think the reason IntelliJ doesn't use the Javadoc tags in the default, is so that it avoids possible interference with any coding/javadoc standards that might exist in development shops. It should be obvious to the user if the default needs to be modified to something more appropriate.

Where I am working, the use of author tags is discouraged, for various reasons.

brass-kazoo
+1  A: 

It is likely that the header snippet you show is older than javadoc and was just borrowed from some coding standard document, probably written for C++.

Alex B
It appears the company was founded to make a Java IDE: http://www.jetbrains.com/company/jbstory.html
James A. N. Stauffer
My point is that they probably looked around and found a C++ coding standards document (maybe from a former job, maybe from somewhere online) and grabbed the header from that.
Alex B
+1  A: 

Because it's a default file template that you're supposed to change to your organization's standard, or your tastes.

My best guess.

Trampas Kirk