JDK-4359470 : javadoc tool: Modify Comment.java for easy writing of custom tags
  • Type: Enhancement
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 1.2.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic,solaris_2.6
  • CPU: generic,sparc
  • Submitted: 2000-08-04
  • Updated: 2014-05-05
  • Resolved: 2001-06-30
Related Reports
Duplicate :  
Relates :  
Description
Modify javadoc so that users can create custom tags without modifying 
the standard doclet.

A developer has submitted the working code for this, for us
to incorporate.  However, his code works only for inline tags.
We should modify it to work for normal tags as well.
One question:  Is his implementation the best approach?
Someone else has suggested a "listener" interface.

Here are his instructions:

A new Comment.class overrides the class file of the same name in the javadoc package.  Comment.java has been modified to include hooks to a new
class CustomTagFactory. 

To add a new inline tag you need to to the following...

1       Create a factory class for your tag class.
        Derive your factory from interface CustomTagFactoryImpl.

2       Create you tag class.
        A handy base class CustomTagImpl (based on TagImpl) is provided for  
        this.

3       All extension classes must be registered in a file called     
        javadocplugin/resources/customtag.properties.
        The classpath will be searched for this file.
        It expected to find lines like ...

        javadoc.tag.custom.inline=javadocplugin.CustomTagFactory_mltag

        ... one line for each custom class. the path to your custom class is 
        relative to the classpath.

Comments
PUBLIC COMMENTS This is a duplicate of 4282805, which has been fixed. jamie.ho@Eng 2001-06-27
27-06-2001

EVALUATION Jamie, this seems like a dupe of bug 4395777 "Tag listener interface". Would you please evaluate this and merge the two if necessary? doug.kramer@Eng 2000-12-08 This is a duplicate of 4282805, which has been fixed. jamie.ho@Eng 2001-06-27
08-12-2000