Commit 087684a
authored
[generator] Improve Javadoc remarks on properties (#911)
Fixes: #905
Commit 7574f16 added support for `generator --with-javadoc-xml=JDOC`
and `generator --doc-copyright=COPYRIGHT`, with the contents of
`COPYRIGHT` being appended to the `<remarks/>` section for member.
This "append to `<remarks/>`" logic happened *before* docs for
property getters and setters were merged. Consequently, the
`COPYRIGHT` contents could be "duplicated":
<summary>Return the current requested orientation of the activity. -or- Change the desired orientation of this activity.</summary>
<value>Returns an orientation constant as used in
<c>ActivityInfo#screenOrientation ActivityInfo.screenOrientation</c>.</value>
<remarks>
<para>Property getter documentation:</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/android/app/Activity#getRequestedOrientation()" title="Reference documentation">Java documentation for <code>android.app.Activity.getRequestedOrientation()</code>.</a>
</format>
</para>
<para>Portions of this page are modifications based on…</para>
<para>Property setter documentation:</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/android/app/Activity#setRequestedOrientation(int)" title="Reference documentation">Java documentation for <code>android.app.Activity.setRequestedOrientation(int)</code>.</a>
</format>
</para>
<para>Portions of this page are modifications based on…</para>
</remarks>
Rework things so that property getters and setters no longer
automatically include `COPYRIGHT` into their `<remarks/>` content.
Instead, append `COPYRIGHT` to the `<remarks/>` element *after* the
get- and set- docs have been merged.
The custom `<summary>` and `<remarks>` merging that happens for
properties will now also use `XContainer.Nodes()` instead of
`XContainer.DescendantNodes()` to avoid content duplication.
The result removes the "Portions of this page…" duplication:
<summary>Return the current requested orientation of the activity. -or- Change the desired orientation of this activity.</summary>
<value>Returns an orientation constant as used in
<c>ActivityInfo#screenOrientation ActivityInfo.screenOrientation</c>.</value>
<remarks>
<para>Property getter documentation:</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/android/app/Activity#getRequestedOrientation()" title="Reference documentation">Java documentation for <code>android.app.Activity.getRequestedOrientation()</code>.</a>
</format>
</para>
<para>Property setter documentation:</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/android/app/Activity#setRequestedOrientation(int)" title="Reference documentation">Java documentation for <code>android.app.Activity.setRequestedOrientation(int)</code>.</a>
</format>
</para>
<para>Portions of this page are modifications based on…</para>
</remarks>1 parent dcdcce1 commit 087684a
File tree
3 files changed
+30
-11
lines changed- tools/generator
- Java.Interop.Tools.Generator.ObjectModel
- Java.Interop.Tools.Generator.Transformation
- SourceWriters
3 files changed
+30
-11
lines changedLines changed: 15 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
29 | | - | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| |||
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
42 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
46 | 50 | | |
47 | 51 | | |
48 | 52 | | |
| 53 | + | |
49 | 54 | | |
50 | 55 | | |
51 | 56 | | |
| |||
78 | 83 | | |
79 | 84 | | |
80 | 85 | | |
81 | | - | |
| 86 | + | |
82 | 87 | | |
83 | 88 | | |
84 | | - | |
| 89 | + | |
85 | 90 | | |
86 | 91 | | |
87 | 92 | | |
| |||
93 | 98 | | |
94 | 99 | | |
95 | 100 | | |
| 101 | + | |
96 | 102 | | |
97 | 103 | | |
98 | 104 | | |
| |||
105 | 111 | | |
106 | 112 | | |
107 | 113 | | |
108 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
109 | 118 | | |
110 | | - | |
| 119 | + | |
111 | 120 | | |
112 | 121 | | |
113 | 122 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| 161 | + | |
161 | 162 | | |
162 | 163 | | |
163 | 164 | | |
| 165 | + | |
164 | 166 | | |
165 | 167 | | |
166 | 168 | | |
167 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
168 | 173 | | |
169 | 174 | | |
170 | 175 | | |
171 | 176 | | |
172 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
173 | 183 | | |
174 | 184 | | |
175 | 185 | | |
| |||
187 | 197 | | |
188 | 198 | | |
189 | 199 | | |
190 | | - | |
| 200 | + | |
191 | 201 | | |
192 | 202 | | |
193 | 203 | | |
| |||
204 | 214 | | |
205 | 215 | | |
206 | 216 | | |
207 | | - | |
| 217 | + | |
208 | 218 | | |
209 | 219 | | |
210 | 220 | | |
| |||
0 commit comments