Skip to content

Conversation

@jlahoda
Copy link
Contributor

@jlahoda jlahoda commented Feb 28, 2021

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.

chained-calls

Feedback/opinions are welcome!

Thanks!

@jlahoda jlahoda added the Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) label Feb 28, 2021
@matthiasblaesing
Copy link
Contributor

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.

@jlahoda
Copy link
Contributor Author

jlahoda commented Mar 20, 2021

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:
https://github.com/jlahoda/netbeans/tree/java-chained-types-improvement-feb-2020-var2

A sample screenshot:
chained-types-var2

What do you think?

Thanks!

@geertjanw geertjanw added this to the 12.4 milestone Mar 29, 2021
@geertjanw
Copy link
Member

How ready is this for 12.4?

@jlahoda
Copy link
Contributor Author

jlahoda commented Mar 30, 2021

@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.

@geertjanw
Copy link
Member

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.

@jlahoda jlahoda modified the milestones: 12.4, 12.5 Apr 16, 2021
@jlahoda
Copy link
Contributor Author

jlahoda commented Apr 16, 2021

Let's wait, I guess.

@matthiasblaesing
Copy link
Contributor

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:

Bildschirmfoto von 2021-04-16 20-48-05

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):

image

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:

image

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?

@ebarboni
Copy link
Contributor

@matthiasblaesing @jlahoda, can we merge this. And later make UI improvement or the current is not usable.

@jlahoda
Copy link
Contributor Author

jlahoda commented Jul 26, 2021

@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.

@ebarboni
Copy link
Contributor

ok moving to 12.6

@ebarboni ebarboni modified the milestones: 12.5, 12.6 Jul 26, 2021
@netbeansuser2019
Copy link

Nothing against that inline hints, but sometimes it takes to much space on screen so need scrolling.
Maybe one more suggestion if it could not be possible to be added one extra option to view menu to show only on active e.g. when (typing) cursor is in "chained tree" and mouse is over it.

@neilcsmith-net
Copy link
Member

@matthiasblaesing @jlahoda thoughts on this? Doesn't seem fully resolved, but don't want to keep pushing back milestones. Thanks.

@neilcsmith-net neilcsmith-net modified the milestones: 12.6, NB13 Oct 22, 2021
@neilcsmith-net
Copy link
Member

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.

@neilcsmith-net neilcsmith-net removed this from the NB13 milestone Jan 14, 2022
@mbien
Copy link
Member

mbien commented Jan 25, 2022

eagerly waiting for the feb 2022 version

@matthiasblaesing
Copy link
Contributor

Merged via #5013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants