Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4706525
Votes 1
Synopsis Doclet API: Extend Doclet API with holder() method in Tag interface
Category doclet:tbd
Reported Against 1.4
Release Fixed 1.4.2(mantis)
State 10-Fix Delivered, request for enhancement
Priority: 2-High
Related Bugs
Submit Date 21-JUN-2002
Description
I have added the holder method to the Tag interface.  
 xxxxx@xxxxx  2002-08-19Add 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.




 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)
======================================================================
Work Around
N/A
Evaluation
Straightforward and necessary.
 xxxxx@xxxxx  2002-06-21

We have been cleared by the Tiger planning committee to pursue
this feature.
 xxxxx@xxxxx  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.
 xxxxx@xxxxx  2002-08-19

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

--  xxxxx@xxxxx  2002-10-23

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

 xxxxx@xxxxx  2002-11-04
Comments
  
  Include a link with my name & email   

Submitted On 01-NOV-2002
pollermann
In addition you may want to access the RootDoc element.
This can be used for error reporting as RootDoc is derived
from DocErrorReporter.


Submitted On 31-MAR-2004
suran1125@miraenet.com
si



PLEASE NOTE: JDK6 is formerly known as Project Mustang