-
Notifications
You must be signed in to change notification settings - Fork 917
Java chained types improvement feb 2020 #2785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Java chained types improvement feb 2020 #2785
Conversation
…ethod invocations as well.
…esult is used e.g. as a method argument.
|
I think this is a nice update to the parameter name annotations. I'm not sure, whether I prefer the types at the end or if it would be easier to follow if the return types would be showed inline between the braces. |
|
Thanks for the comment, @matthiasblaesing . I've tried to sketch putting the inline types after the braces (which, I think, also allows to eliminate some that are probably not so interesting, as they are not part of chained method invocation). I've put that here: What do you think? Thanks! |
|
How ready is this for 12.4? |
|
@geertjanw - I think the main task here is to decide which of the variants we want to follow (or if there is a different variant we want to follow). The code is hopefully more or less fine. |
|
Should this go in for 12.4 or should we delay for 12.5? I.e., @jlahoda, feel free to make a choice above and just let's go with that. |
|
Let's wait, I guess. |
|
Sorry for the late reply. I had another look at this tonight and found some issues: It looks as if the return type output only works once: For the second prototype, I like the inline display, but the alignment looks strange (left Marker) and it seems the intermediate returns displayed in the first prototype (above) are missing here (right marker): Thinking over this, having the types at the end of the line has less impact on the layout, though the parameters already take size. One thing I noticed with the cursor handling is, that it now feels a bit strange with the types: At this point I'd have expected the cursor behind the closing brace, not behind the type. Just an idea: place the cursor on the side of the type/parameter signature, that has no whitespace? |
|
@matthiasblaesing @jlahoda, can we merge this. And later make UI improvement or the current is not usable. |
|
@ebarboni - I think the existing state is acceptable, so this should only be merged when we are satisfied with the result. I apologize I didn't have time to look through Matthias' comments yet. |
|
ok moving to 12.6 |
|
Nothing against that inline hints, but sometimes it takes to much space on screen so need scrolling. |
|
@matthiasblaesing @jlahoda thoughts on this? Doesn't seem fully resolved, but don't want to keep pushing back milestones. Thanks. |
|
As there's been no follow up and this has been bumped a number of milestones already, I'm just going to remove the milestone. Please close, update or re-add to a milestone if discussion is resolved. |
|
eagerly waiting for the feb 2022 version |
|
Merged via #5013 |




As noted here:
#2365 (comment)
When the Java editor shows return types for chained method invocations, it could possibly show them in additional contexts. This PR is trying to show the return types in most/all contexts.
Feedback/opinions are welcome!
Thanks!