JDK-1242492 : stddoclet: Add links to source code, using -src option
  • Type: Enhancement
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 1.0,1.2.0,1.2.2,1.3.0
  • Priority: P5
  • Status: Closed
  • Resolution: Fixed
  • OS: generic,solaris_2.4,windows_nt
  • CPU: generic,x86,sparc
  • Submitted: 1996-03-17
  • Updated: 2014-05-05
  • Resolved: 2001-07-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.0 beta2Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Description
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
(javadoc).

Example:

...

Where the only difference is the  
'<a href="src.java.awt.Label.html#getAlignment()">SRC</a>'

and the creation of the src.java.awt.Label.html file with the appropriate <a name=> tags.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: merlin-beta2 FIXED IN: merlin-beta2 INTEGRATED IN: merlin-beta2 VERIFIED IN: merlin-beta3
14-06-2004

EVALUATION 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. doug.kramer@Eng 1997-10-06 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. doug.kramer@Eng 1998-03-31 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. robert.field@Eng 1998-09-09 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 requested. 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). neal.gafter@Eng 2001-03-29 Location of fix: SourceToHTMLConverter.java Configuration.java MethodSubWriter.java ClassWriter.java FieldSubWriter.java standard.properties jamie.ho@Eng 2001-06-20 -src has been renamed as -linksource (Fix for 4489854). Verified for -linksource. ###@###.### 2001-10-18
20-06-2001

PUBLIC COMMENTS 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 (javadoc). ===== 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. jamie.ho@Eng 2001-06-20 -src has been renamed as -linksource. ###@###.### 2001-10-18
20-06-2001