JDK-8254721: Improve support for conditionally generated files #674
Conversation
Improve support for conditionally generated files
|
@jonathan-gibbons The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
Looks good, Jon. The inline comments all refer to minor issues. |
// System Properties | ||
if (configuration.conditionalPages.contains(HtmlConfiguration.PageKind.SYSTEM_PROPERTIES)) { | ||
section = newHelpSection(contents.systemPropertiesLabel); | ||
Content constantsBody = getContent("doclet.help.systemProperties.body", |
hns
Oct 19, 2020
Member
Not an actual problem, but constantsBody
is the name used for the constant values page. Should be either a generic name or one hinting at the system properties content.
Not an actual problem, but constantsBody
is the name used for the constant values page. Should be either a generic name or one hinting at the system properties content.
jonathan-gibbons
Oct 19, 2020
Author
Contributor
Good catch; will fix.
Good catch; will fix.
*/ | ||
// Note: this should (eventually) be merged with Navigation.PageMode, | ||
// which performs a somewhat similar role | ||
public enum PageKind { |
hns
Oct 19, 2020
Member
Maybe call it ConditionalPage
and change comment to "Kinds of conditional pages" to make purpose/scope clearer?
Maybe call it ConditionalPage
and change comment to "Kinds of conditional pages" to make purpose/scope clearer?
jonathan-gibbons
Oct 19, 2020
Author
Contributor
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.
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.
depr.generateDeprecatedListFile( | ||
new DeprecatedAPIListBuilder(configuration)); | ||
DeprecatedAPIListBuilder deprAPI = configuration.deprecatedAPIListBuilder; | ||
if (deprAPI != null && !deprAPI.isEmpty()) { |
hns
Oct 19, 2020
Member
Just a note regarding consistency: everywhere else you are using configuration.conditionalPages.contains(HtmlConfiguration.PageKind.DEPRECATED)
for this check.
Just a note regarding consistency: everywhere else you are using configuration.conditionalPages.contains(HtmlConfiguration.PageKind.DEPRECATED)
for this check.
jonathan-gibbons
Oct 19, 2020
Author
Contributor
Yes, thanks; noted; I guess this is a hangover from before I added the PageKind.
Yes, thanks; noted; I guess this is a hangover from before I added the PageKind.
@jonathan-gibbons This change now passes all automated pre-integration checks. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 28 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.
|
Responded to all review feedback, and latest version builds and tests. Will integrate. /integrate |
@jonathan-gibbons Since your change was applied there have been 29 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit cb5cdd7. |
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:
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..
Progress
Testing
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/674/head:pull/674
$ git checkout pull/674