Skip to content

Commit 4d5e1ed

Browse files
committedSep 8, 2021
8272375: Improve phrasing of synthesized descriptions in JavaFX docs
Reviewed-by: kcr, prappo
1 parent 267c61a commit 4d5e1ed

File tree

4 files changed

+56
-56
lines changed

4 files changed

+56
-56
lines changed
 

‎src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets.properties

+5-5
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ doclet.not_standard_file_manager = Cannot set taglet path; the file manager is n
8585
doclet.Author=Author:
8686
doclet.DefaultValue=Default value:
8787
doclet.PropertyDescription=Property description:
88-
doclet.PropertyGetterWithName=Gets the value of the property {0}.
89-
doclet.PropertyGetterReturn=the value of the property {0}
90-
doclet.PropertySetterWithName=Sets the value of the property {0}.
91-
doclet.PropertySetterParam=the value for the property {0}
92-
doclet.PropertyMethodReturn=the property {0}
88+
doclet.PropertyGetterWithName=Gets the value of the {0} property.
89+
doclet.PropertyGetterReturn=the value of the {0} property
90+
doclet.PropertySetterWithName=Sets the value of the {0} property.
91+
doclet.PropertySetterParam=the value for the {0} property
92+
doclet.PropertyMethodReturn=the {0} property
9393
doclet.Default=Default:
9494
doclet.Parameters=Parameters:
9595
doclet.TypeParameters=Type Parameters:

‎test/langtools/jdk/javadoc/doclet/testJavaFX/TestJavaFX.java

+38-38
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,14 @@ public void test1() {
7272
<div class="member-signature"><span class="modifiers">public final</span>&nbsp;<\
7373
span class="return-type">void</span>&nbsp;<span class="element-name">setRate</span><wbr>\
7474
<span class="parameters">(double&nbsp;value)</span></div>
75-
<div class="block">Sets the value of the property <code>rate</code>.</div>
75+
<div class="block">Sets the value of the <code>rate</code> property.</div>
7676
<dl class="notes">
7777
<dt>Property description:</dt>""",
7878
"""
7979
<div class="member-signature"><span class="modifiers">public final</span>&nbsp;<\
8080
span class="return-type">double</span>&nbsp;<span class="element-name">getRate</span>()<\
8181
/div>
82-
<div class="block">Gets the value of the property <code>rate</code>.</div>
82+
<div class="block">Gets the value of the <code>rate</code> property.</div>
8383
<dl class="notes">
8484
<dt>Property description:</dt>""",
8585
"""
@@ -117,14 +117,14 @@ public void test1() {
117117
<div class="member-signature"><span class="modifiers">public final</span>&nbsp;<\
118118
span class="return-type">double</span>&nbsp;<span class="element-name">isPaused<\
119119
/span>()</div>
120-
<div class="block">Gets the value of the property <code>paused</code>.</div>""",
120+
<div class="block">Gets the value of the <code>paused</code> property.</div>""",
121121
"""
122122
<section class="detail" id="setPaused(boolean)">
123123
<h3>setPaused</h3>
124124
<div class="member-signature"><span class="modifiers">public final</span>&nbsp;<\
125125
span class="return-type">void</span>&nbsp;<span class="element-name">setPaused</\
126126
span><wbr><span class="parameters">(boolean&nbsp;value)</span></div>
127-
<div class="block">Sets the value of the property <code>paused</code>.</div>
127+
<div class="block">Sets the value of the <code>paused</code> property.</div>
128128
<dl class="notes">
129129
<dt>Property description:</dt>
130130
<dd>Defines if paused. The second line.</dd>
@@ -136,7 +136,7 @@ public void test1() {
136136
<div class="member-signature"><span class="modifiers">public final</span>&nbsp;<\
137137
span class="return-type">double</span>&nbsp;<span class="element-name">isPaused<\
138138
/span>()</div>
139-
<div class="block">Gets the value of the property <code>paused</code>.</div>
139+
<div class="block">Gets the value of the <code>paused</code> property.</div>
140140
<dl class="notes">
141141
<dt>Property description:</dt>
142142
<dd>Defines if paused. The second line.</dd>
@@ -151,39 +151,39 @@ public void test1() {
151151
<div class="block">Defines the direction/speed at which the <code>Timeline</code> is expected to
152152
be played. This is the second line.</div>""",
153153
"""
154-
<section class="detail" id="setRate(double)">
155-
<h3>setRate</h3>
156-
<div class="member-signature"><span class="modifiers">public final</span>&nbsp;<\
157-
span class="return-type">void</span>&nbsp;<span class="element-name">setRate</sp\
158-
an><wbr><span class="parameters">(double&nbsp;value)</span></div>
159-
<div class="block">Sets the value of the property <code>rate</code>.</div>
160-
<dl class="notes">
161-
<dt>Property description:</dt>
162-
<dd>Defines the direction/speed at which the <code>Timeline</code> is expected to
163-
be played. This is the second line.</dd>
164-
<dt>Default value:</dt>
165-
<dd>11</dd>
166-
<dt>Parameters:</dt>
167-
<dd><code>value</code> - the value for the property <code>rate</code></dd>
168-
<dt>Since:</dt>
169-
<dd>JavaFX 8.0</dd>""",
154+
<section class="detail" id="setRate(double)">
155+
<h3>setRate</h3>
156+
<div class="member-signature"><span class="modifiers">public final</span>&nbsp;<\
157+
span class="return-type">void</span>&nbsp;<span class="element-name">setRate</sp\
158+
an><wbr><span class="parameters">(double&nbsp;value)</span></div>
159+
<div class="block">Sets the value of the <code>rate</code> property.</div>
160+
<dl class="notes">
161+
<dt>Property description:</dt>
162+
<dd>Defines the direction/speed at which the <code>Timeline</code> is expected to
163+
be played. This is the second line.</dd>
164+
<dt>Default value:</dt>
165+
<dd>11</dd>
166+
<dt>Parameters:</dt>
167+
<dd><code>value</code> - the value for the <code>rate</code> property</dd>
168+
<dt>Since:</dt>
169+
<dd>JavaFX 8.0</dd>""",
170170
"""
171-
<section class="detail" id="getRate()">
172-
<h3>getRate</h3>
173-
<div class="member-signature"><span class="modifiers">public final</span>&nbsp;<\
174-
span class="return-type">double</span>&nbsp;<span class="element-name">getRate</span>()<\
175-
/div>
176-
<div class="block">Gets the value of the property <code>rate</code>.</div>
177-
<dl class="notes">
178-
<dt>Property description:</dt>
179-
<dd>Defines the direction/speed at which the <code>Timeline</code> is expected to
180-
be played. This is the second line.</dd>
181-
<dt>Default value:</dt>
182-
<dd>11</dd>
183-
<dt>Returns:</dt>
184-
<dd>the value of the property <code>rate</code></dd>
185-
<dt>Since:</dt>
186-
<dd>JavaFX 8.0</dd>""",
171+
<section class="detail" id="getRate()">
172+
<h3>getRate</h3>
173+
<div class="member-signature"><span class="modifiers">public final</span>&nbsp;<\
174+
span class="return-type">double</span>&nbsp;<span class="element-name">getRate</span>()<\
175+
/div>
176+
<div class="block">Gets the value of the <code>rate</code> property.</div>
177+
<dl class="notes">
178+
<dt>Property description:</dt>
179+
<dd>Defines the direction/speed at which the <code>Timeline</code> is expected to
180+
be played. This is the second line.</dd>
181+
<dt>Default value:</dt>
182+
<dd>11</dd>
183+
<dt>Returns:</dt>
184+
<dd>the value of the <code>rate</code> property</dd>
185+
<dt>Since:</dt>
186+
<dd>JavaFX 8.0</dd>""",
187187
"""
188188
<section class="property-summary" id="property-summary">
189189
<h2>Property Summary</h2>
@@ -226,7 +226,7 @@ public void test1() {
226226

227227
checkOutput("index-all.html", true,
228228
"""
229-
<div class="block">Gets the value of the property <code>paused</code>.</div>""",
229+
<div class="block">Gets the value of the <code>paused</code> property.</div>""",
230230
"""
231231
<div class="block">Defines if paused.</div>""");
232232

‎test/langtools/jdk/javadoc/doclet/testJavaFX/TestJavaFXCombo.java

+9-9
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,12 @@ void checkGetter(Kind fk, Kind pk, Kind gk, Kind sk) {
155155
<section class="detail" id="getExample()">
156156
<h3>getExample</h3>
157157
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">getExample</span>()</div>
158-
<div class="block">Gets the value of the property <code>example</code>.</div>
158+
<div class="block">Gets the value of the <code>example</code> property.</div>
159159
<dl class="notes">
160160
<dt>Property description:</dt>
161161
#DESC#
162162
<dt>Returns:</dt>
163-
<dd>the value of the property <code>example</code></dd>
163+
<dd>the value of the <code>example</code> property</dd>
164164
#SEE#
165165
</dl>
166166
</section>
@@ -180,7 +180,7 @@ void checkGetter(Kind fk, Kind pk, Kind gk, Kind sk) {
180180
<div class="block">Getter method description. More getter method description.</div>
181181
<dl class="notes">
182182
<dt>Returns:</dt>
183-
<dd>the property <code>example</code></dd>
183+
<dd>the <code>example</code> property</dd>
184184
</dl>
185185
</section>
186186
""");
@@ -200,12 +200,12 @@ void checkSetter(Kind fk, Kind pk, Kind gk, Kind sk) {
200200
<section class="detail" id="setExample(boolean)">
201201
<h3>setExample</h3>
202202
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setExample</span><wbr><span class="parameters">(boolean&nbsp;b)</span></div>
203-
<div class="block">Sets the value of the property <code>example</code>.</div>
203+
<div class="block">Sets the value of the <code>example</code> property.</div>
204204
<dl class="notes">
205205
<dt>Property description:</dt>
206206
#DESC#
207207
<dt>Parameters:</dt>
208-
<dd><code>b</code> - the value for the property <code>example</code></dd>
208+
<dd><code>b</code> - the value for the <code>example</code> property</dd>
209209
#SEE#
210210
</dl>
211211
</section>
@@ -246,7 +246,7 @@ void checkPropertyMethod(Kind fk, Kind pk, Kind gk, Kind sk) {
246246
#PCOMM#
247247
<dl class="notes">
248248
<dt>Returns:</dt>
249-
<dd>the property <code>example</code></dd>
249+
<dd>the <code>example</code> property</dd>
250250
#SEE#
251251
</dl>
252252
</section>
@@ -266,7 +266,7 @@ void checkPropertyMethod(Kind fk, Kind pk, Kind gk, Kind sk) {
266266
<div class="block">Property method description. More property method description.</div>
267267
<dl class="notes">
268268
<dt>Returns:</dt>
269-
<dd>the property <code>example</code></dd>
269+
<dd>the <code>example</code> property</dd>
270270
#SEE#
271271
</dl>
272272
</section>
@@ -371,7 +371,7 @@ String getPropertyMethodText(Kind fk) {
371371
case COMMENT -> """
372372
/**
373373
* Property method description. More property method description.
374-
* @return the property {@code example}
374+
* @return the {@code example} property
375375
*/
376376
public BooleanProperty exampleProperty();
377377
""";
@@ -392,7 +392,7 @@ String getGetterMethodText(Kind fk) {
392392
case COMMENT -> """
393393
/**
394394
* Getter method description. More getter method description.
395-
* @return the property {@code example}
395+
* @return the {@code example} property
396396
*/
397397
public boolean getExample();
398398
""";

‎test/langtools/jdk/javadoc/doclet/testJavaFX/TestJavaFXMissingPropComments.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ public boolean getValue() {
9292
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span c\
9393
lass="return-type">boolean</span>&nbsp;<span class="element-name">getValue</span\
9494
>()</div>
95-
<div class="block">Gets the value of the property <code>value</code>.</div>
95+
<div class="block">Gets the value of the <code>value</code> property.</div>
9696
<dl class="notes">
9797
<dt>Property description:</dt>
9898
<dd>The value property (property method comment).</dd>
9999
<dt>Returns:</dt>
100-
<dd>the value of the property <code>value</code></dd>
100+
<dd>the value of the <code>value</code> property</dd>
101101
<dt>See Also:</dt>
102102
<dd>
103103
<ul class="see-list">
@@ -156,12 +156,12 @@ public boolean getValue() {
156156
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span c\
157157
lass="return-type">boolean</span>&nbsp;<span class="element-name">getValue</span\
158158
>()</div>
159-
<div class="block">Gets the value of the property <code>value</code>.</div>
159+
<div class="block">Gets the value of the <code>value</code> property.</div>
160160
<dl class="notes">
161161
<dt>Property description:</dt>
162162
<dd>The value property (field comment).</dd>
163163
<dt>Returns:</dt>
164-
<dd>the value of the property <code>value</code></dd>
164+
<dd>the value of the <code>value</code> property</dd>
165165
<dt>See Also:</dt>
166166
<dd>
167167
<ul class="see-list">

0 commit comments

Comments
 (0)
Please sign in to comment.