RFR: JDK-8320458: Improve structural navigation in API documentation [v4]
Hannes Wallnöfer
hannesw at openjdk.org
Thu Jan 18 09:34:19 UTC 2024
On Tue, 16 Jan 2024 19:26:21 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:
>> Hannes Wallnöfer has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Consolidate TOC functionality into new TableOfContents class
>
> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriter.java line 99:
>
>> 97:
>> 98: pHelper = new PropertyUtils.PropertyHelper(configuration, typeElement);
>> 99: tableOfContents = new TableOfContents(this);
>
> Is there a reason to do this here (and also in `ModuleWriter` and `PackageWriter` etc) rather than in the (shared) super-constructor for `HtmlDocletWriter` ?
The reason for doing it in the concrete writer classes is that only some `HtmlDocletWriter` subclasses have a table of contents, and I don't think there's an easy way to figure out in the super-constructor which instances need a table of contents and which don't. We could have the subclasses pass it as an argument to the super-constructor I guess.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17062#discussion_r1457162662
More information about the build-dev
mailing list