On Fri, 6 Mar 2026 20:13:02 GMT, Chen Liang <[email protected]> wrote:
>> Please review an enhancement that adds a new default `toString` method to >> the `jdk.javadoc.doclet.Taglet` interface which receives the path to the >> documentation root directory as additional argument of type `java.net.URI`. >> (The initial version of this PR used `java.nio.file.Path` which was of >> course a blunder as that class uses a platform-dependent separator.) >> >> This makes it possible to create correct relative URLs when a tag is >> rendered outside of its element's resource (such as in a summary page), >> which was previously impossible using the public Taglet API. It also makes >> it easier to build relative URLs in the common case where a tag is rendered >> in its element's normal location. >> >> I also added the changes for >> [JDK-8379520](https://bugs.openjdk.org/browse/JDK-8379520) to make use of >> the new API in JDK build Taglets to this PR. The changes to the `JSpec` and >> `ToolGuide` taglets consist in undoing the changes from >> [JDK-8373909](https://bugs.openjdk.org/browse/JDK-8373909) and replacing it >> with the new functionality. >> >> For `SealedGraph` it's a bit more involved, because in order to be able to >> use the `pathToRoot` URI I had to change the naming of .svg files for nested >> classes to not use subdirectories for enclosing classes so that these files >> use the same directory as all the other files from that package. >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Can we remove the hack used by JSpec taglet as a POC of this new API? Or do > you plan to do in a later RFE? @liach could you please re-approve this PR? The changes since your first review are changes to the doc comment due to CSR review, and merging of your changes to `SealedGraph` taglet. ------------- PR Comment: https://git.openjdk.org/jdk/pull/30120#issuecomment-4257904360
