This requires three features:
- Add a -src option to javadoc, which specifies the path to the source code.
- Write a converter to convert .java files to .html files with the required
<a name="xxx"></a> tags.
- Add capability within templates to insert <a href="yyy.html#xxx">method</a>
I feel this is important and do-able in 1.2 timeframe. It would be a shame
not to include this, since we include the source code.
On Feb 17, 1998, the TRC (Josh Bloch, Mark Reinhold, Bill Shannon) decided
that we would not implement this as part of the standard doclet, because it
would encourage too much dependence on the source code.
I agree completely that the API docs should not include the source. However,
there are legitimate reason to want to view source (eg. you are developing it).
This is one of the most requested additions to javadoc - I am reopening this
RFE because this capability would allow a quite reasonable poor man's source
browser. Of course, now with Doclets, a user could do this themselves.
Source file, line, and column are being added to the javadoc API.
That should be enough to allow the standard doclet to do what is
The simplest way to do it would be to simply link directly to the
raw source file (possibly preceded by a user-speficied base path).
Location of fix:
-src has been renamed as -linksource (Fix for 4489854).
Verified for -linksource.
javadoc needs an option that will take and make a link from the method name
to the Source file where that method is defined. With this a VERY NICE source
brouser could be available through the standard documentation program
This RFE has been implemented. When -src is used, the doclet generates links from classes and members to the appropriate locations in the source code. A very simple .java to .html converter has been added to com.sun.tools.doclets. In the near future, this converter will be improved.
-src has been renamed as -linksource.