RFR: JDK-8254721: Improve support for conditionally generated files

Jonathan Gibbons jjg at openjdk.java.net
Mon Oct 19 17:12:12 UTC 2020


On Mon, 19 Oct 2020 14:49:51 GMT, Hannes Wallnöfer <hannesw at openjdk.org> wrote:

>> The overall pages is very dynamic and depends on a lot of factors, such as the input files and the command-line
>> options. Some of the summary files depend on the content of the classes being documented, such as:
>> * any constant values declared in the files
>> * any deprecated elements
>> * any serializable classes
>> * any classes whose description references system properties
>> 
>> This change is a step towards handling these files in a uniform manner.
>> 
>> There is a new test to test the consistency of the new behavior..
>
> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java line 136:
> 
>> 134:     // Note: this should (eventually) be merged with Navigation.PageMode,
>> 135:     // which performs a somewhat similar role
>> 136:     public enum PageKind {
> 
> Maybe call it `ConditionalPage` and change comment to "Kinds of conditional pages" to make purpose/scope clearer?

That would be a reasonable short term fix, but I was hoping to merge with `Navigation.PageMode` since both are enums
for the different kinds of pages we generate. But I have not yet found the sweet spot for where to put this enum: it
may be best for it to end up as a top-level enum in the `formats.html` package.  Or, we avoid merging them, and rename
`PageKind` as you suggest.

-------------

PR: https://git.openjdk.java.net/jdk/pull/674


More information about the javadoc-dev mailing list