You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[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>
0 commit comments