JDK-4075480 : Add example support in doc with @example tag
  • Type: Enhancement
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 1.0.1,1.1.2,1.1.6,1.2.0,1.3.1
  • Priority: P5
  • Status: Closed
  • Resolution: Won't Fix
  • OS: generic,linux,windows_95,windows_nt
  • CPU: generic,x86
  • Submitted: 1997-08-29
  • Updated: 2024-04-12
  • Resolved: 2017-12-13
Related Reports
Duplicate :  
Duplicate :  
Description
Name: joT67522			Date: 08/29/97

/** @example


         <----- Example of use here ------>

*/
company - Kodak , email - ###@###.###
======================================================================

Comments
WORK AROUND You can output any custom tag using the -tag option. In this case, use this command line option: -tag example:a:"Example:" This takes the text from an @example tag in all (a) doc comments (field, method. constructor, class, package) and outputs it with the heading "Example:".
11-06-2004

EVALUATION This would make the API docs an order of magnitude more useful. We can use the examples already created for Java Class Libraries. doug.kramer@Eng 1997-10-06 Our current plan is to link to the Java Tutorial wherever possible, instead of standalone examples. Patrick Chan is not amenable to having us link the API docs to his examples, because it could kill the sales of his book. doug.kramer@Eng 1998-02-05 We should also enable the example to be in a separate file in the newly-created "doc-files" directory. In this case, there would only be a paragraph and a link to that file: @example This example is <a href="doc-files/buttons.java">a dialog box with two buttons(/a>. doug.kramer@Eng 1998-03-16
16-03-1998