United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-4706525 Doclet API: Extend Doclet API with holder() method in Tag interface
JDK-4706525 : Doclet API: Extend Doclet API with holder() method in Tag interface

Details
Type:
Enhancement
Submit Date:
2002-06-21
Status:
Resolved
Updated Date:
2002-12-09
Project Name:
JDK
Resolved Date:
2002-12-09
Component:
docs
OS:
other,windows_nt
Sub-Component:
doclet
CPU:
x86,generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
1.4.0
Fixed Versions:
1.4.2 (mantis)

Related Reports

Sub Tasks

Description
Add the following method to com.sun.javadoc.Tag:

public Doc holder();

This method would return the Doc element that holds the tag.  
It would be useful to have a holder() method in the Tag interface because it
would give taglets access to the Doc object that holds the tag.  This makes
taglets such as {@inheritDoc} easier to write.  The {@inheritDoc} taglet
illustrates that it is sometimes necessary to access the holder to perform
the required operations.

Other Doclet API changes will be needed to support generics, which is in 
a separate RFE.

Name: rmT116609			Date: 10/31/2002


 DESCRIPTION OF THE PROBLEM :
The interface com.sun.javadoc.Tag provides methods to retrieve the name and the text of a custom tag. But there is no method to obtain the class or method where the tag was written. The position does not help very much.

If you look at the implementation of the class com.sun.tools.javadoc.TagImpl you see that in a com.sun.tools.javadoc.DocImpl object is passed to the
constructor.

I suggest to extend the interface com.sun.javadoc.Tag by the method holder() which returns an object of class com.sun.javadoc.Doc.

I did this for an internal project by decompiling the TagImpl class and building a new tools.jar and it helped me a lot.

CUSTOMER WORKAROUND :
Modify the implemenation of TagImpl in the tools.jar (see description for details).
(Review ID: 166297)
======================================================================

                                    

Comments
PUBLIC COMMENTS

I have added the holder method to the Tag interface.  
###@###.### 2002-08-19
                                     
2002-08-19
EVALUATION

Straightforward and necessary.
###@###.### 2002-06-21

We have been cleared by the Tiger planning committee to pursue
this feature.
###@###.### 2002-08-09



I have added the holder method to the Tag interface.  Although this RFE has been approved for Tiger I hope that we can integrate this new method into Mantis.  It is very straight forward and would be userful taglet writing.  There are many taglets that take a Doc object as a parameter.  With this holder() method, is is no longer necessary to have that parameter.
###@###.### 2002-08-19

PIT reports that this bug has not been fixed on windows 2000.

-- iag@sfbay 2002-10-23

I deleted the shell script based regression test and rewrote the test in Java.  The test now runs properly on Windows.

###@###.### 2002-11-04
                                     
2002-10-23
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
mantis

FIXED IN:
mantis

INTEGRATED IN:
mantis
mantis-b05


                                     
2004-06-14



Hardware and Software, Engineered to Work Together