Commit 7716ae5
authored
[generator] Merge Javadoc return values on bound properties (#995)
Context: 0e01fb5
Context: https://developer.android.com/reference/android/animation/Keyframe#setInterpolator(android.animation.TimeInterpolator)
The Java source for `Keyframe.setInterpolator` incidentally includes
a `@return` tag, even though the return type is void:
/**
* Sets the optional interpolator for this Keyframe. A value of <code>null</code> indicates
* that there is no interpolation, which is the same as linear interpolation.
*
* @return The optional interpolator for this Keyframe.
*/
public void setInterpolator(TimeInterpolator interpolator) {
mInterpolator = interpolator;
}
This causes us to generate multiple `<returns>` C# doc comment tags
on the `Android.Animation.Keyframe.Interpolator` property, as the
setter and getter both include the same `@return` tag:
/// <summary>Gets the optional interpolator for this Keyframe. -or- Sets the optional interpolator for this Keyframe.</summary>
/// ...
/// <returns>The optional interpolator for this Keyframe.</returns>
/// <returns>The optional interpolator for this Keyframe.</returns>
public virtual unsafe Android.Animation.ITimeInterpolator? Interpolator {
The `mdoc` tool does not handle this well, and will continuously
append a `<value/>` element on this property every time the tool runs
against our improperly formatted C# doc comments:
<Docs>
<summary>Gets the optional interpolator for this Keyframe. -or- Sets the optional interpolator for this Keyframe.</summary>
<value>The optional interpolator for this Keyframe.</value>
<value>The optional interpolator for this Keyframe.</value>
<value>The optional interpolator for this Keyframe.</value>
…
<since version="Added in API level 11" />
</Docs>
Fix this by attempting to merge `<returns/>` elements for property
getters and setters.1 parent 51c3dae commit 7716ae5
1 file changed
+16
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| 182 | + | |
182 | 183 | | |
183 | 184 | | |
184 | 185 | | |
| |||
223 | 224 | | |
224 | 225 | | |
225 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
226 | 242 | | |
227 | 243 | | |
0 commit comments