How to tell what files have NOT been Javadoc'd.

Is there a way to generate a list of filenames that lists out what has not been Javadoc'd? I have tons of Java files, and I need to produce a list to give back to the developers, that tells that what they haven't Javadoc'd. Thanks.
[248 byte] By [ilevya] at [2007-10-2 21:37:20]
# 1

Javadoc does not have a way to print what files it doesn't document (that I can think of).

Are you using the -subpackages option, or passing in package names, or passing in source filenames?

Are you asking for it to list classes within the scope of what you passed in on the command line that it did not document, or classes outside the scope?

Inside the scope, it would have to list classes with more restricted access than requested, such as private classes. Were you thinking of other cases?

Outside the scope would require you specify the scope you're interested in.

-Doug

dhkramera at 2007-7-14 0:51:37 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 2

I don't honestly know the answer to your questions. I'm way too new at Java and NetBeans to even understand your questions.But maybe if I explain to you what I'm doing, it might help:

We use NetBeans to do the file editing of the Java source code (and we use CVS to centralize the source code and commit changes daily). To compile a new Javadocs document, I use the following additional options for the documentation of the software:

-J-Xmx128M -link http://java.sun.com/j2se/1.5.0/docs/api

Those are the only paramater settings that I inputted into the "Documenting" section of the project, when I view its "Properties" to try to get it to generate Javadocs using NetBeans IDE.

As long as I have one of the source files highlighted, my NetBeans IDE "Tools" menu gives an option of "Autocomment". This produces a list of all the source files that are not Javadoc'd. But it only does it for one class/file at a time.

ilevya at 2007-7-14 0:51:37 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 3

I guess I do have come answers to your questions. Since we use NetBeans IDE to compile and generate Javadocs, the whole project gets compiled in one whack. I assume there is some sort of makefile (?) that lists out all the programs or toplevel directoy names, and all the subdirectories are recursively passed on down when th eoperation takes place.

ilevya at 2007-7-14 0:51:37 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 4

I haven't used NetBeans in a year or so. I assume NetBeans has a "package list" or "package tree" that lists the source files included in your project. NetBeans would likely just pass those package names to javadoc as follows (assuming they are named com.package1 and com.package2):

javadoc -J-Xmx128M -link http://java.sun.com/j2se/1.5.0/docs/api com.package1 com.package2

If you select just two java files, it does this instead:

javadoc -J-Xmx128M -link http://java.sun.com/j2se/1.5.0/docs/api MyClass1.java MyClass.java

I suppose it notices the difference between the two lists and tells you which files it is omitting.

dhkramera at 2007-7-14 0:51:37 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 5

Our NetBeans IDE guru found an Ant solution. But it leaves a lot to be desired. That's why I'm posting this in the Forum. His solution is as follows.

The build.xml file was added the following:

<target name="Build Javadoc Report - Files">

<property file="nbproject/project.properties"/>

<property file="nbproject/private/private.properties"/>

<echo message="Building Javadoc package information"></echo>

<delete dir="dist/JavadocReport"></delete>

<mkdir dir="dist/JavadocReport"></mkdir>

<javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck" docletpath="doccheck.jar" maxmemory="256M" destdir="dist/JavadocReport">

<packageset dir="${src.dir}" includes="*/**"/>

</javadoc>

This generates some reports. But the information is broken down in a way that it's not easy for a number of developers to sift through. The toplevel report is very top level, and you can't see the whole tree sturcture of what is not Javadoc'd in one swoop.

So I'm sifting through the list that this Ant script generates, and figurin out what who wrote what file, and what files are related to the top level report. For instance, the report might tell me that file cxxi.apisupport.pythonsupport has 5 files without Javadocs. But I have to click on "cxxi.apisupport.pythonsupport" to find out what the 5 files are, as these are listed in a separate part of the report. I think this is as close as I will get, with the limited knowledge I have at the moment about Javadocs, scripts, python and all this stuff.

have a nice weekend!

ilevya at 2007-7-14 0:51:37 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...