JDK-8270195 : Add missing links between methods of JavaFX properties
  • Type: Enhancement
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 18
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-07-09
  • Updated: 2021-08-31
  • Resolved: 2021-08-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 18
18 b12Fixed
Related Reports
Relates :  
Description
A JavaFX property consists of grouped xxxxProperty(), setXxxx(), and getXxxx() (or isXxxx() for boolean properties) methods. Further, the javadoc support for JavaFX properties creates an entry for the property itself, and summarizes them in a list of properties. For example, here is the entry for the "rotate" property:

https://openjfx.io/javadoc/16/javafx.graphics/javafx/scene/Node.html#rotateProperty

In addition to the description, which is copied to the methods for that property, there is a link to the getXxxx() and setXxxx() methods. However, there is no link to the xxxProperty() method. It would be useful to add this link. Similarly, the getXxxx() and setXxxx() methods could link to each other and to xxxxProperty().

See the following for the current state of the docs:

https://openjfx.io/javadoc/16/javafx.graphics/javafx/scene/Node.html#rotateProperty()
https://openjfx.io/javadoc/16/javafx.graphics/javafx/scene/Node.html#setRotate(double)
https://openjfx.io/javadoc/16/javafx.graphics/javafx/scene/Node.html#getRotate()

One other bit of missing information that we could consider adding, either as part of this RFE or a separate one, is a `Returns: <descrption>` for the getXxxx() and xxxxProperty() methods, for consistency with the documentation of other non-void methods.
Comments
Changeset: d34f17c6 Author: Jonathan Gibbons <jjg@openjdk.org> Date: 2021-08-24 16:10:25 +0000 URL: https://git.openjdk.java.net/jdk/commit/d34f17c6973748693de1bdd040bc3e8a0f15f197
24-08-2021

Some of this is a side effect of the different code paths for when there is a possibly-private field for the underlying property, and whether that field has a doc comment. An interesting experiment is to create two simple example classes, one with a comment on the field, and one without. Run javadoc on both and then compare the generated files. (See screenshot, attached. The left hand side does not have a comment on the field declaration; the right hand side does have a comment on the field.) Based on that, a good first step would be to determine if/when/where any info on the field should be displayed, Then, having determined where the comment should _not_ have an impact, we can determine what should be displayed.
09-07-2021