views:

58

answers:

3

A tool (preferably free or open source) that converts java source code to html with proper links from uses of identifiers to their definitions.

A: 

Javadoc is the tool you are looking for. The fact that it is easily expandable, should suit your needs quite well. As an example the FAQ provides how you can basically edit the standard doc. Now this isn't exactly what you want, but by expanding Javadoc you should be able to produce the results you want.

I hope this helps.

Jamie Lewis
Can you elaborate how javadoc can be used to format java _source_ code the way OP wants?
ChssPly76
+3  A: 

Take a look at java2html.com - seems pretty close to what you want. It's GPL so you could perhaps tweak it to your needs.

ChssPly76
A: 

I think http://www.java2html.com/ will do what you need. An Ant task is included:

    <taskdef name="java2html" classname="com.java2html.Java2HTMLTask"
             classpathref="cp"/>
    <property name="html.src.dir" value="demos/main/war/src"/>
    <mkdir dir="${html.src.dir}"/>
    <java2html destination="${html.src.dir}" header="false" footer="false">
        <fileset dir="src" includes="**/*.java"/>
    </java2html>
David Tinker