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

Autocomplete doesn't fully override #46

Closed
2 tasks done
akurtakov opened this issue Apr 4, 2023 · 5 comments
Closed
2 tasks done

Autocomplete doesn't fully override #46

akurtakov opened this issue Apr 4, 2023 · 5 comments
Assignees
Labels
bug Something isn't working upstream-jdtls

Comments

@akurtakov
Copy link
Collaborator

Let's make sure issue is not already fixed in snapshots first.

Steps to reproduce

From a fresh installation and clean workspace:

Screencast from 2023-04-04 18-08-57.webm shows using sysout template and how a leading 's' symbol stays making the code illegal.

Tested under this environment:

  • OS & version: Fedora 38
  • Eclipse IDE/Platform version: Eclipse 4.28 I-build

Community

  • I understand reporting an issue to this OSS project does not mandate anyone to fix it. Other contributors may consider the issue, or not, at their own convenience. The most efficient way to get it fixed is that I fix it myself and contribute it back as a good quality patch to the project.
@akurtakov
Copy link
Collaborator Author

@rgrunber is there anything special done for templates e.g. sysout in vscode-java ? What is https://github.com/redhat-developer/vscode-java/blob/master/snippets/server.json#L2 for ?

@rgrunber
Copy link
Member

rgrunber commented Apr 6, 2023

I would guess that things like https://github.com/redhat-developer/vscode-java/blob/master/snippets/server.json are used at https://github.com/redhat-developer/vscode-java/blob/d0f4f5bbb80b44ebbc4407f23e4a976bc7477a05/src/snippetCompletionProvider.ts#L12 as a temporary measure until the LS is up, since the same snippets are available at https://github.com/eclipse/eclipse.jdt.ls/blob/master/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corext/template/java/CodeSnippetTemplate.java . See https://github.com/redhat-developer/vscode-java/blob/d0f4f5bbb80b44ebbc4407f23e4a976bc7477a05/src/standardLanguageClient.ts#L147-L148 .

It might be a bit overkill, but there's some instances where the language server is not yet at ServiceReady so the client can't expect to get a response for textDocument/completion (where we inject the snippets server-side), but the user might be typing so it's good to be able to provide some basic things.

@mickaelistria
Copy link
Collaborator

This is eclipse-jdtls/eclipse.jdt.ls#2626

@mickaelistria
Copy link
Collaborator

#63 adds a test to cover that case.

@mickaelistria
Copy link
Collaborator

#63 is merged and validates upstream fix in the LS works.

@github-project-automation github-project-automation bot moved this from In Progress to Done in Java Tooling Apr 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream-jdtls
Projects
Status: Done
Development

No branches or pull requests

3 participants