RFR: JDK-8286470: Support searching for sections in class/package javadoc
Jonathan Gibbons
jjg at openjdk.org
Fri May 26 14:52:57 UTC 2023
On Fri, 26 May 2023 14:36:30 GMT, Hannes Wallnöfer <hannesw at openjdk.org> wrote:
> Please review a change to generate search index entries for all HTML headings in the documentation comments and auxiliary files. The change is relatively straightforward, new code replaces and complements the code to generate `id` attributes for all headings.
>
> JDK API docs generated with this change are available here: https://cr.openjdk.org/~hannesw/8286470/api.00/
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java line 1516:
> 1514: HtmlId htmlId = htmlIds.forHeading(headingContent, headingIds);
> 1515: id = htmlId.name();
> 1516: attrs.add("id=\"").add(htmlId.name()).add("\"");
I'm not saying this is wrong, but it does look like a weird way to achieve the goal. It seems like either the wrong type is being passed in (`Content` instead of `HtmlTree`) or we're missing some abstraction here.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14179#discussion_r1206903911
More information about the javadoc-dev
mailing list