Skip to content
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

Trigger signature help on completion item selected #2426

Merged

Conversation

jdneo
Copy link
Collaborator

@jdneo jdneo commented Apr 21, 2022

requires eclipse-jdtls/eclipse.jdt.ls#2065

Now when a completion item is selected, it will automatically trigger signature help:

a

The value of the setting java.signatureHelp.enabled is still disabled by default. The reason is that, currently we cannot get which item is selected and provide that signature correctly. Considering method like System.out.println(), which has multiple overload versions, the current implementation won't work.

a

To solve this problem, we can leverage the command field of the completion item. Send back the selected one's information and cache it. But that needs some refactoring works to be done in IntelliCode as well. So currently, just keep it to false.

Signed-off-by: sheche [email protected]

@rgrunber
Copy link
Member

Right. I ran into this and wondered if eclipse-jdtls/eclipse.jdt.ls#2025 might improve the situation.

Copy link
Member

@rgrunber rgrunber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change works for me. Feel free to merge when ready.

@jdneo
Copy link
Collaborator Author

jdneo commented Apr 23, 2022

Right. I ran into this and wondered if eclipse-jdtls/eclipse.jdt.ls#2025 might improve the situation.

Unfortunately, that PR won't help in this case, since currently the user's selection does not report back to the server. But since we have the completion item command. Technically, it should be achievable.

@testforstephen testforstephen added this to the Early May 2022 milestone Apr 27, 2022
@testforstephen testforstephen merged commit 72633ab into redhat-developer:master Apr 27, 2022
@jdneo jdneo deleted the cs/enable-signature-help branch April 27, 2022 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants