views:

1689

answers:

4

I have a large codebase without javadoc and I want to run a program to write a skeleton with the basic javadoc information (e.g. for each method's parameter write @param...) so I just have to fill the gaps left.

Somebody knows a good solution for this?

Edit:

JAutodoc is what I was looking for, it has ant tasks, an eclipse plugin and uses velocity for the template definition. Thank you Laurent K.

A: 

If you right-click in the source of a file in Eclipse, it has a Javadoc generation option under the source menu.

Silas
I don't see it under the source menu, is there a setting which I am missing?
Joshua
I don't know -- it's always been there for me :(
Silas
+2  A: 

The JAutodoc plugin for eclipse does exactly what you need, but with a package granularity :

right click on a package, select "Add javadoc for members..." and the skeleton will be added.

There are numerous interesting options : templates for javadoc, adding a TODO in the header of every file saying : "template javadoc, must be filled...", etc.

Laurent K
A: 

You can configure eclipse to show warnings for things that lack javadoc, or have javadoc that does not have all the information, or has wrong information. It can also insert templates for you to fill out.

Not quite the tool you asked for, but probably better because you won't end up with empty skeletons on methods that you missed.

izb
how do you configure this?
Joshua
+2  A: 

I think auto-generating empty Javadoc is an anti-pattern and should be discouraged; it gives code the appearance of being documented, but just adds noise to the codebase.

I would recommend instead that you configure your code editor to assist on a per-method and per-class basis to use when you actually write the javadoc (one commenter pointed to Eclipse's feature that does this).

davetron5000