Skip to content

8356975: Provide alternative way to generate preview API docs #26267

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

hns
Copy link
Member

@hns hns commented Jul 11, 2025

Please review a change to allow marking API elements as preview features via a new hidden --preview-feature-tag option. In conjunction with the already existing hidden --preview-note-tag option this allows documenting elements as preview features without relying on JDK-internal types.

Part of this change is a refactoring of how SummaryListWriter allows its subclasses to extend the content of summary pages. The old addExtra* hook methods were too unflexible as they always add extra content before other page content. I replaced them with protected getIndexLinks and addSummaries methods that allow overriding methods to add extra content before or after the default content returned by the super method.

The change also includes the fix for JDK-8355933 to change the presentation and wording for elements with preview notes as requested by the Valhalla team.

The output generated by the new test with preview features marked by tags can be viewed here.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issues

  • JDK-8356975: Provide alternative way to generate preview API docs (Enhancement - P4)
  • JDK-8355933: Change section title for permanent APIs affected by preview features (Bug - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/26267/head:pull/26267
$ git checkout pull/26267

Update a local copy of the PR:
$ git checkout pull/26267
$ git pull https://git.openjdk.org/jdk.git pull/26267/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 26267

View PR using the GUI difftool:
$ git pr show -t 26267

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/26267.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 11, 2025

👋 Welcome back hannesw! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Jul 11, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot added the rfr Pull request is ready for review label Jul 11, 2025
@openjdk
Copy link

openjdk bot commented Jul 11, 2025

@hns The following label will be automatically applied to this pull request:

  • javadoc

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.

@hns
Copy link
Member Author

hns commented Jul 11, 2025

/issue add JDK-8355933

@openjdk
Copy link

openjdk bot commented Jul 11, 2025

@hns
Adding additional issue to issue list: 8355933: Change section title for permanent APIs affected by preview features.

@mlbridge
Copy link

mlbridge bot commented Jul 11, 2025

Webrevs

var previewDiv = HtmlTree.DIV(HtmlStyles.previewBlock);
previewDiv.setId(htmlIds.forPreviewSection(forWhat));
previewDiv.add(HtmlTree.DIV(HtmlStyles.previewComment,
commentTagsToContent(forWhat, tags.getFirst().getContent(), false)));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a check to assert there is exactly one occurrence of such a preview note tag?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javadoc [email protected] rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

2 participants