8372055: Fragment link tag does not work in package info#28372
8372055: Fragment link tag does not work in package info#28372hns wants to merge 4 commits intoopenjdk:masterfrom
Conversation
|
👋 Welcome back hannesw! A progress list of the required criteria for merging this PR into |
|
@hns This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. 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 136 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. ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
| case MODULE -> env.toplevel.modle; | ||
| case COMPILATION_UNIT -> | ||
| // Treat unqualified reference in legacy package.html as package reference. | ||
| // Unqualified references in doc-fiiles only need to work locally, so null is fine. |
There was a problem hiding this comment.
| // Unqualified references in doc-fiiles only need to work locally, so null is fine. | |
| // Unqualified references in doc-files only need to work locally, so null is fine. |
| if (ref == null && refSignature.startsWith("##")) { | ||
| // Unqualified local anchor link | ||
| return htmlWriter.links.createLink(HtmlId.of(refFragment), labelContent); | ||
| } |
There was a problem hiding this comment.
Why do we need a new if here? Does this not fall into the else if (refFragment == null) { block somehow?
There was a problem hiding this comment.
refFragment is not null here, ref is, which is the referenced element. This is necessary for unqualified hash fragment links in doc-files, where the referenced element is set to null in JavacTrees. We know that local links in doc-files will never be used outside of the doc-file itself (for example in summary or index pages), so we can always create a simple local hash fragment link.
I've updated the comment to say that this is for doc-files.
|
/integrate |
|
Going to push as commit 85d4f55.
Your commit was automatically rebased without conflicts. |
Please review a change to make unqualified anchor references such as
{@link ##anchor link}work everywhere. Previously, such links only worked in class pages. The fix consists in attributing the correct Element inJavacTrees::attributeDocReferencefor references declared in API elements, and setting it tonullfor references defined indoc-filesto make them work as local links.Because of unattributed
doc-filesreferences, we also have to exclude such links from the reference check in DocLint. This is fine because local references always have a target element, and we do not check the anchor anyway.Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/28372/head:pull/28372$ git checkout pull/28372Update a local copy of the PR:
$ git checkout pull/28372$ git pull https://git.openjdk.org/jdk.git pull/28372/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 28372View PR using the GUI difftool:
$ git pr show -t 28372Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/28372.diff
Using Webrev
Link to Webrev Comment