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

Completion for 'new String' is wrong #3127

Closed
yuyully opened this issue Jun 1, 2023 · 1 comment · Fixed by eclipse-jdtls/eclipse.jdt.ls#2686
Closed

Completion for 'new String' is wrong #3127

yuyully opened this issue Jun 1, 2023 · 1 comment · Fixed by eclipse-jdtls/eclipse.jdt.ls#2686
Assignees
Milestone

Comments

@yuyully
Copy link

yuyully commented Jun 1, 2023

Environment
  • Operating System: windows
  • JDK version: 17
  • Visual Studio Code version: 1.78.2
  • Java extension version:1.19.0
Steps To Reproduce
  1. Type new String and select new String(byte[] bytes)
    string
Current Result

After select new String(byte[] bytes), it becomes String(string original) automatically.

Expected Result

It should be new String(byte[] bytes) as I select it.

@jdneo
Copy link
Collaborator

jdneo commented Jun 1, 2023

The root cause is that the context (selected item) is not persisted for the signature help. But since now we have the onDidSelectedCompletionItem hook, I think it's doable now.

I'll take a look.

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.

4 participants