Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4359470

javadoc tool: Modify Comment.java for easy writing of custom tags

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Duplicate
    • P4
    • None
    • 1.2.0
    • tools
    • generic, sparc
    • generic, solaris_2.6

    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.

      Attachments

        Issue Links

          Activity

            People

              jhosunw Jamie Ho (Inactive)
              dkramersunw Douglas Kramer (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: