[GeoNetwork-devel] Make javadoc more helpful

Here's a patch to make the generated javadoc ever so slightly
more helpful. It also removes many of the errors you
normally see during javadoc generation (ahem . . .).

It tells javadoc to use the library jar
files to produce package-qualified class names in the
generated output.

For example, if you look in the generated javadoc
output for the class org.fao.geonet.services.mef.Import,
you'll see that the method exec()'s first parameter
is of type "Element", but there's no indication where
the class "Element" comes from.

Now apply the patch and regenerate the javadocs.
The parameter is now shown as type "org.jdom.Element".

That's as good as it gets until you also add the
source code (or at least generated javadocs) of
the libraries. In fact I've gone through the
exercise of downloading all the source of all
the library jars and running javadoc on the
whole thing - it can be done, after a
lot of hard work! Unfortunately I don't
have a means of distributing (or even hosting)
the results just yet.

--
Richard Walker
Software Improvements Pty Ltd
Phone: +61 2 6273 2055
Fax: +61 2 6273 2082

(attachments)

gnpatch3.txt (1.39 KB)

Thanks again Richard!
Jeroen

On Mar 26, 2008, at 3:18 AM, Software Improvements gn-devel wrote:

Here's a patch to make the generated javadoc ever so slightly
more helpful. It also removes many of the errors you
normally see during javadoc generation (ahem . . .).

It tells javadoc to use the library jar
files to produce package-qualified class names in the
generated output.

For example, if you look in the generated javadoc
output for the class org.fao.geonet.services.mef.Import,
you'll see that the method exec()'s first parameter
is of type "Element", but there's no indication where
the class "Element" comes from.

Now apply the patch and regenerate the javadocs.
The parameter is now shown as type "org.jdom.Element".

That's as good as it gets until you also add the
source code (or at least generated javadocs) of
the libraries. In fact I've gone through the
exercise of downloading all the source of all
the library jars and running javadoc on the
whole thing - it can be done, after a
lot of hard work! Unfortunately I don't
have a means of distributing (or even hosting)
the results just yet.

-- Richard Walker
Software Improvements Pty Ltd
Phone: +61 2 6273 2055
Fax: +61 2 6273 2082
Index: docs/build.xml

--- docs/build.xml (revision 1209)
+++ docs/build.xml (working copy)
@@ -93,10 +93,17 @@

  <!-- =============================================================== -->
  
+ <path id="gn.classpath">
+ <fileset dir="../web/geonetwork/WEB-INF/lib">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
  <target name="javadoc-gn">
    <delete dir="${dbf.basedir}/html/javadoc/geonetwork" />
    <mkdir dir="${dbf.basedir}/html/javadoc/geonetwork" />
    <javadoc sourcepath ="../src"
+ classpathref="gn.classpath"
        destdir ="${dbf.basedir}/html/javadoc/geonetwork"
        packagenames="org.fao.*"
        windowtitle ="GeoNetwork class documentation"/>
@@ -104,10 +111,17 @@
  
  <!-- =============================================================== -->
  
+ <path id="im.classpath">
+ <fileset dir="../web/intermap/WEB-INF/lib">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
  <target name="javadoc-im">
    <delete dir="${dbf.basedir}/html/javadoc/intermap" />
    <mkdir dir="${dbf.basedir}/html/javadoc/intermap" />
    <javadoc sourcepath ="../src"
+ classpathref="im.classpath"
        destdir ="${dbf.basedir}/html/javadoc/intermap"
        packagenames="org.wfp.*"
        windowtitle ="InterMap class documentation"/>
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork