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

Signature Help sometimes doesn't work on constructors and qualified method declarations #2097

Closed
zhouxinghong opened this issue Sep 5, 2021 · 10 comments · Fixed by eclipse-jdtls/eclipse.jdt.ls#2014

Comments

@zhouxinghong
Copy link

zhouxinghong commented Sep 5, 2021

Deprecated. . .

@testforstephen
Copy link
Collaborator

Your video is broken, i just saw a blank screen there.

@zhouxinghong
Copy link
Author

Please download and watch again. . .

@testforstephen
Copy link
Collaborator

i couldn't open this video in macOS, but i finally saw your video on a Windows machine.

Your issue is about signatureHelp feature. I reproduced it using eclipse.jdt.ls source code itself.

Move the cursor over the sendStatus method and then trigger the parameter hint (aka. signature help), and it will show some other unrelated method parameters like equals.
image

@testforstephen testforstephen changed the title In the process of editing Java code, the method parameter prompt is abnormal, and the method parameter information cannot be correctly prompted. Signature Help provides some unrelated method parameters Sep 10, 2021
@testforstephen testforstephen self-assigned this Sep 10, 2021
@snjeza
Copy link
Contributor

snjeza commented Feb 21, 2022

Related issue - eclipse-jdtls/eclipse.jdt.ls#1980
@zhouxinghong Could you reproduce the issue in VS Code 1.3.0?

@snjeza
Copy link
Contributor

snjeza commented Feb 22, 2022

@zhouxinghong Could you, please, attach a sample project?

@snjeza
Copy link
Contributor

snjeza commented Feb 23, 2022

This issue has been confirmed by the testers above. . . You can consult them for specific reasons. . . @testforstephen

i couldn't open this video in macOS, but i finally saw your video on a Windows machine.

Your issue is about signatureHelp feature. I reproduced it using eclipse.jdt.ls source code itself.

Move the cursor over the sendStatus method and then trigger the parameter hint (aka. signature help), and it will show some other unrelated method parameters like equals.

@zhouxinghong I can't reproduce this issue in VS Code 1.3.0. It has been fixed with eclipse-jdtls/eclipse.jdt.ls#1981

Unable to view method/parameters overloads

Does CA (Ctrl-Space) work properly?

@nimatrueway
Copy link

nimatrueway commented Feb 24, 2022

Not an irrelevant parameter hint case; but I have a very simple project with 2 classes that if you try to invoke parameter hint on new AuthenticationService(...) nothing shows up.

image

sample.zip

@snjeza
Copy link
Contributor

snjeza commented Feb 24, 2022

The following is the performance of 1.3.0. . .
Unable to view method/parameters overloads

@zhouxinghong Does CA (Ctrl-Space) work properly here?

Not an irrelevant parameter hint case; but I have a very sample project with 2 classes that if you try to invoke parameter hint on new AuthenticationService(...) nothing shows up.

@nimatrueway I can reproduce the issue. I will try to fix it.

@snjeza
Copy link
Contributor

snjeza commented Feb 28, 2022

@snjeza snjeza changed the title Signature Help provides some unrelated method parameters Signature Help sometimes doesn't work on constructors and qualified method declarations Feb 28, 2022
@rgrunber
Copy link
Member

rgrunber commented Mar 1, 2022

I just checked upstream Eclipse, and this functionality seems a bit broken there. I suspect we have some workarounds of our own to react to some of the unwanted behaviour. Almost looks like there's confusion between matching methods that satisfy the parameter type, with overloaded methods whose signature should be considered.

strange-signature-help

Update : eclipse-jdtls/eclipse.jdt.ls#2014 (comment) also mentions some regressions.

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

Successfully merging a pull request may close this issue.

5 participants