RFR: 241518: Member signature parameter span contains closing but not opening parens

Hannes Wallnoefer HANNES.WALLNOEFER at ORACLE.COM
Tue Jul 28 12:45:00 UTC 2020


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/javadoc-dev/attachments/20200728/7bfec8b7/attachment.htm>


More information about the javadoc-dev mailing list