RFR: 241518: Member signature parameter span contains closing but not opening parens
Pavel Rappo
pavel.rappo at oracle.com
Wed Jul 29 14:42:22 UTC 2020
Thanks for doing this.
It seems possible for an empty list of parameters "()" to be of one style, while a non-empty list to be of another: AbstractMemberWriter.java:689:694
If so, should we fix that too?
-Pavel
> On 28 Jul 2020, at 13:45, Hannes Wallnoefer <hannes.wallnoefer at oracle.com> wrote:
>
> Please review:
>
> JBS: https://bugs.openjdk.java.net/browse/JDK-8241518
> Webrev: http://cr.openjdk.java.net/~hannesw/8241518/webrev.00/
> API docs: http://cr.openjdk.java.net/~hannesw/8241518/api.00/
>
> This changes the „parameters“ span in member signatures to contain both opening and closing parens, whereas previously it only contained the closing parens.
>
> To preserve visual alignment of parameters, a space character is added after each line break added to the parameter list. Thus, the new code renders method signatures as shown below with the box representing the „parameters“ span:
> __________
> methodName|(int p1, |
> | int p2, |
> | int p3) |
> |__________|
>
> Previously it was rendered the following way:
> _________
> methodName(|int p1, |
> |int p2, |
> |int p3) |
> |_________|
>
> IMO this also improves layout when method name and parameters don’t fit the browser width, as the whole parameter span including both parens is now broken to a new line, preserving its layout with the single space indentation.
>
> Thanks,
> Hannes
More information about the javadoc-dev
mailing list