-
Notifications
You must be signed in to change notification settings - Fork 15
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
Manage client snippet on server side #251
Conversation
This PR manages Quarkus snippets on server side. Snippets are the same than vscode snippet except that it adds a "context": {
"extension": "quarkus-agroal"
} For the moment it's a draft PR since I must comment all codes and write tests. You can play with this PR and you should see When this PR will be merged, we could methe the PR from vscode-quarkus redhat-developer/vscode-quarkus#228 which removes those snippets on client side. |
c23564f
to
901fd52
Compare
Here a demo, you can see that there one To test this PR:
Once this PR will be merged, we will able to to remove client snippets. |
This PR includes too snippets for java files mp rest and mp openapi snippets written by @rzgry #246 (comment) @rzgry do you want I remove your snippets from this PR? Or is it OK to keep it and create a new PR to update them? Today it should work like vscode snippet client, but I need to manage filter :
|
@angelozerr its fine for you to keep the snippets in this PR. I can open other PRs to update the existing ones / add snippets for other microprofile specifications |
Nice, I will write some tests around those snippets. I think this PR will not manage filter, I would like to do that in an another PR. When we did that we will update snippets json to manage context. |
0e7711d
to
673241c
Compare
It should be fixed.
It should be fixed. The PR is now ready, I write tests too. The load of snippets is done by Java SPI (see https://github.com/redhat-developer/quarkus-ls/pull/251/files#diff-56d60c257da46fc9af0a48f34ca4798eR67) and for the moment Quarkus snippets are hosted into MicroProfile LS too. We need to create a new project Today the snippet of application.properties are shown according to the dependency of the project. For java snippets for the momen tit is not done. I would like to manage that in an another PR. |
4fe65dc
to
7ef830c
Compare
...redhat.microprofile.ls/src/main/java/com/redhat/microprofile/ls/JavaTextDocumentService.java
Outdated
Show resolved
Hide resolved
...rofile.ls/src/main/java/com/redhat/microprofile/ls/commons/snippets/SnippetDeserializer.java
Outdated
Show resolved
Hide resolved
...croprofile.ls/src/main/java/com/redhat/microprofile/ls/commons/snippets/SnippetRegistry.java
Outdated
Show resolved
Hide resolved
...microprofile.ls/src/main/java/com/redhat/microprofile/snippets/SnippetContextProperties.java
Outdated
Show resolved
Hide resolved
The new fixes work great on my machine. Please fix this failed test:
|
7dafda3
to
5d1ca99
Compare
fixed. |
Fixes redhat-developer/vscode-quarkus#119 Signed-off-by: azerr <azerr@redhat.com>
Manage client snippet on server side
Fixes redhat-developer/vscode-quarkus#119
Signed-off-by: azerr azerr@redhat.com