Hi Dalibor,
Thanks for those pointers. Is there a primer for writing Java 9 Taglets
which is similar to the primer for writing old-style Taglets found here:
http://docs.oracle.com/javase/7/docs/technotes/guides/javadoc/taglet/overview.html.
Simply replacing com.sun.tools.doclets.Taglet with
jdk.javadoc.doclet.taglet.Taglet and com.sun.javadoc.Tag with
com.sun.source.doctree.DocTree is not good enough. For instance, when
implementing com.sun.tools.doclets.Taglet.toString(Tag), one calls
Tag.text() in order to get the tag contents. But DocTree does not have a
text() method. Instead, it relies on a Visitor pattern. It would be
helpful to see an example implementation of a Java 9 Taglet.
Hopefully a primer for Java 9 Taglets will also explain the contract for
jdk.javadoc.doclet.taglet.Taglet.getAllowedLocations(). The javadoc is a
bit terse. In particular, I don't understand what harm would be done by
always returning the Set of all Taglet.Location enums.
Thanks,
-Rick
On 6/30/16 3:27 AM, dalibor topic wrote:
On 30.06.2016 03:25, Rick Hillegas wrote:
Can you help me find that code and the documentation for it?
Please see
http://download.java.net/java/jdk9/docs/jdk/api/javadoc/doclet/index.html
for the documentation.
The corresponding source code for the implementation can be found in
the jdk 9 langtools repository, at the
src/jdk.javadoc/share/classes/jdk/javadoc path.
cheers,
dalibor topic