-
Notifications
You must be signed in to change notification settings - Fork 453
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
main, pscm, ctor and method snippets not working #3466
Comments
Do you have an example of a piece of code where the snippets don't work ? Those snippets are context aware, so they would not appear if used outside of a type declaration. (eg. #3422 (comment) ) |
Example where the I also discovered that the snippets work for a brief second while reloading the project using "Clean Java Language Server Workspace" from the command palette. First time writing I can also add that out of every person I asked, all 5 or 6 had the exact same problem on their own computers. |
Would you be able to share the project ? It definitely looks like a bug, but nothing from the gif immediately stands out as odd. You might see the snippets briefly at the beginning because they're coming from https://github.com/redhat-developer/vscode-java/blob/master/snippets/server.json . However, once the language server is fully loaded we disable those because the language server should provide context information to enable them more selectively (ie. not when creating them would clearly be invalid). |
Here is a stripped down version of the project where the issue still persists: https://github.com/viljanvr/Java-Example-Project |
Thanks. I can reproduce. Can you confirm that it works if you remove the
This is looking like an upstream bug. Similar to https://bugs.eclipse.org/bugs/show_bug.cgi?id=242286 but I haven't been able to find anything more recent. |
Yes, can confirm it works after |
- Fixes redhat-developer/vscode-java#3466 Signed-off-by: Roland Grunberg <[email protected]>
We spent so much time wondering what the completion context was doing we never asked ourselves how the completion context was doing. 😜 I kept thinking about needing to fix the fact that the completion context lacked the necessary token data, but looking at the actual code, I don't think the data is used at all, which means we should be able to supply some empty value, and allow the generic snippets to be computed without returning an empty list. |
- Fixes redhat-developer/vscode-java#3466 Signed-off-by: Roland Grunberg <[email protected]>
- Fixes redhat-developer/vscode-java#3466 Signed-off-by: Roland Grunberg <[email protected]>
@viljanvr the newest pre-release ( |
Can confirm the pre-release fixes the bug. Thanks! |
The following snippets are not working:
main
,pscm
,ctor
andmethod
. In other words, when writing the prefixes nothing appears. These are all snippets used outside method bodies, so maybe it has something to do with that. The rest of the snippets (such asif
,new
, etc.) work without a problem.The problem persists after all other extensions except Language Support for Java have been disabled.
Environment
The text was updated successfully, but these errors were encountered: