-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
JDK-8270195: Add missing links between methods of JavaFX properties #5102
JDK-8270195: Add missing links between methods of JavaFX properties #5102
Conversation
👋 Welcome back jjg! A progress list of the required criteria for merging this PR into |
@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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran javadoc with this patch to generate the JavaFX docs, and it all looks good. I verified that the synthesized @see
, @param
, and @return
are now all consistently added. The name of the property is now consistently in <code></code>
style, too.
* @param o2 string or tree argument to be formatted into the result | ||
* @return a content tree for the text | ||
*/ | ||
public List<? extends DocTree> getComment(String key, Object o0, Object o1, Object o2) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of this rather complex method to format a text resource? It seems like it is arguments o1
and o2
are never used. Couldn't this be implemented simply using MessageFormat
as it used to be?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of this rather complex method to format a text resource? It seems like it is arguments
o1
ando2
are never used. Couldn't this be implemented simply usingMessageFormat
as it used to be?
This is the DocTree
equivalent of similar code in Content
, to format structured objects into a format string. Previously, using MessageFormat
, the code used "regular" text to inject the name of the property. Now, using this new code, we can inject the equivalent of {@code _name_ }
.
Yes, it is currently a bit more general than strictly required, in that currently we only require a single value to be injected. I guess I was just following the pattern of supporting future use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanation. Sounds reasonable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Apologies for the slow review, It took some time to get acquainted with the workings and handling of javafx properties.
* @param o2 string or tree argument to be formatted into the result | ||
* @return a content tree for the text | ||
*/ | ||
public List<? extends DocTree> getComment(String key, Object o0, Object o1, Object o2) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanation. Sounds reasonable.
@jonathan-gibbons 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 101 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 |
/integrate |
Going to push as commit d34f17c.
Your commit was automatically rebased without conflicts. |
@jonathan-gibbons Pushed as commit d34f17c. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Please review a medium-size update to the support for JavaFX properties in the Standard Doclet.
A JavaFX property is typically defined by a group of up to 4 elements:
Property
and which returns an appropriate property objectEither the field (if present) or the property method (but not both) should have a comment describing the property. The rest should generally _not_have comments: comments will be automatically generated.
This change is primarily to improve the generation of the comments.
@see
links are generated between the methods for a property. In addition, improvements are made to the handling of@return
... adding it as needed, and removing it when not (the latter occurs when generating the docs for the property itself, using the info in the property method.)There is some amount of cleanup to the implementation, most notably moving (and rewriting) the code to generate comments for property methods from
MemberSummaryBuilder
toCommentUtils
,which is where most other synthesized comments are generated. However, the goal has also been to not unduly change the spirit and spec of the original code.A new combo test for JavaFX properties is provided, that creates different instances of a class, containing different property-related methods with and without comments. Basic properties of the output are then verified for each property method: the description, any parameter info, any return info, and any links to other related methods.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5102/head:pull/5102
$ git checkout pull/5102
Update a local copy of the PR:
$ git checkout pull/5102
$ git pull https://git.openjdk.java.net/jdk pull/5102/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 5102
View PR using the GUI difftool:
$ git pr show -t 5102
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5102.diff