views:

749

answers:

3

I know one can use '<alt><shift>J' to create tags for a single code element (class method for example).

But is there a way to automaticaly create these tags for every class in the entire project? Or even just at package or class level?

+2  A: 

Have you looked at JAutodoc?

kd304
This looks like exactly what I am looking for. Downloading now.
Ron Tuffin
+1  A: 

Not that I know of.

What would that be good for anyway? Autogenerated Javadoc comments are worse than useless; I'd rather not have them cluttering up my code, and Javadoc will provide as much information even with no comment present.

Michael Borgwardt
I use Checkstyle to force myself commenting every method in my code.
kd304
The idea would be to create the tags that I can then populate with the requisite comments. I agree that empty javadoc comments are worse than useless.
Ron Tuffin
Checkstyle doesn't know whether a comment actually contains useful information, so the last thing you want is autogenerated useless comments that pacify Checkstyle. Additionally, I'd say that with many methods, writing a comment is a complete waste of time, since it won't contain any information that the method and parameter names do not already convey.
Michael Borgwardt
A: 

Automatic generated JavaDoc is a pain, because other people never now what the method should do and yourself will also not know it, when you look at the class one year later.

Please comment your methods by yourself or do not comment the method.

My company is using checkstyle to force the employers to add javadoc. Some employers hate it to comment their methods and just type sensless comments. It would be better that their is no comment than a useless.

With checkstyle you can find all undocumented methods, to document them in a well format.

What will help you to document an init method like

"init has to be called before any other method and initializes the class ActionDummy"

it is better to tell what exactly is done

Inizializes the default state of the action provider. Some state variables can be overriden by the listener when ....

Markus Lausberg
But it would seem the JAutodoc option "Add ToDo for auto-generated Javadoc" would address your (very valid) concern, would it not? a `// TODO: Auto-generated comment` line would have to be removed after editing the javadoc, for each generated documentation.
VonC
It's not a problem in my company as I am the only developer on most projects and the others are in the roles of manager, architect, associate, tester, document-writer etc (yes, 1:5).
kd304
Why you should than use a auto-generated Javadoc when you have to check it in any case, by removing the TODO
Markus Lausberg