-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Support snippets for VS Code extensions running in a Che Theia sidecar #16502
Comments
FWIW, this works in Theia master with the latest built-ins. |
@sunix can you test? |
is Theia using the Red Hat Java vscode ext ? |
No I don't have Theia installed locally. I let the assignee test with Theia if it is needed. |
Hi David,
Plz check che doc for specific details and try to upgrade as appropriately
or built your own custom image if necessary.
…On Wed, Apr 1, 2020, 16:28 Sun Seng David TAN ***@***.***> wrote:
@sunix <https://github.com/sunix> can you test?
No I don't have Theia installed locally. I let the assignee test with
Theia if it is needed.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#16502 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEYAMLZSMQ2JFIZWGY6IV7TRKMCMFANCNFSM4LXWXH3A>
.
|
Sorry guys but it is impossible to code without a minimum of snippet ... |
try_catch
is not workingtry_catch
, main
and maybe more are not working
try_catch
, main
and maybe more are not workingtry_catch
, main
and maybe more are not working
I can confirm this bug as well. Code snippets that were defined via the VSIX package.json contributes.snippets array appear in Theia, but not Eclipse Che. For example the Red Hat Java VSIX defines two set of snippets.
|
Confirmed with vscode-java 0.62 in theia and vscode-java 0.63 in openshift.io. |
The problem is that the package.json in vscode-java contributes snippets with a relative uri like so:
The code in TheiaPluginScanner#readSnippets() constructs an URI from this like so:
This file uri is supposed to refert to a location relative to where package.json of the vscode extension is located. This works fine when the package is installed in the same place as the Theia back end, but fails when the package is located in a sidecar container. |
There are two ways we could fix this:
My first aproach will be to fix the URI |
@tsmaeder I like your approach to fix the URI. Will you make this fix and how soon? We can assist by verifying. |
I'm working on it. |
Turns out the monaco-snippet-suggest-provider.ts uses the FileSystem class directly, not a Resource. Since our workaround is based on resource, it does not get applied. I guess the right thing to do would be to implement file system providers for plugin resources after https://github.com/eclipse-theia/theia/pull/7908/files is merged |
the snippets defined in package.json are only used until the Language Server has started. After that, they're disabled and server-side snippets should take over. See redhat-developer/vscode-java#1101 |
@fbricon that may be, but the file referenced in package.json still isn't resolved properly. So are you saying the "try" snippet should work eventually? Because I'm not seeing that happening in che-theia. |
@benoitf We can test and do that. Thank you. |
doot doot doo... moving stuff to a more reasonable milestone... doot doot doo... paperwork makes the project better... |
Describe the bug
In Java files, the code snippet (to generate try catch block)
try_catch
is not workingChe version
Steps to reproduce
try
andCtrl+space
inside a methodExpected behavior
Expected to have the
try_catch
like in VSCode:But had no
try_catch
code snippet :(Runtime
The text was updated successfully, but these errors were encountered: