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

Filter for Java (server) snippet #297

Merged

Conversation

angelozerr
Copy link
Contributor

Filter for Java (server) snippet

Fixes #265

Signed-off-by: azerr azerr@redhat.com

@angelozerr
Copy link
Contributor Author

To test this PR, open the microprofile-metrics project (used for test), open a Java file, type @ to open completion, you should see only metrics snippets:

image

Remove metrics dependency and replace with openapi dependency in the pom.xml

In other words, replace:

 <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-smallrye-metrics</artifactId>
    </dependency>

with

 <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-smallrye-openapi</artifactId>
    </dependency>

After refreshing, you should see only openapi snippets:

image

@rzgry I had to fix your openapi snippets because some type package was wrong. Please check my fix are OK.

@angelozerr
Copy link
Contributor Author

I need to clean my code and write tests before switching to a real PR.

@angelozerr angelozerr force-pushed the java-completion-filter-new branch 2 times, most recently from af02b9a to 83a20ad Compare April 8, 2020 13:48
@xorye
Copy link

xorye commented Apr 8, 2020

Works great on my machine.

It wasn't a part of this PR but just one small comment so far:

Please remove the extra space before the last " so that it becomes "\trequired = ${2:true},",

@angelozerr angelozerr force-pushed the java-completion-filter-new branch 2 times, most recently from f71b085 to 94c8504 Compare April 8, 2020 17:11
@angelozerr
Copy link
Contributor Author

Works great on my machine.

Thanks for the feedback.

Please remove the extra space before the last " so that it becomes "\trequired = ${2:true},",

fixed.

@xorye could you please review my code (javadoc and the README please).

@angelozerr angelozerr force-pushed the java-completion-filter-new branch 2 times, most recently from fb88b10 to 03c1138 Compare April 8, 2020 20:08
@angelozerr angelozerr marked this pull request as ready for review April 8, 2020 20:09
@angelozerr angelozerr requested a review from xorye April 8, 2020 20:09
@xorye
Copy link

xorye commented Apr 8, 2020

Also, it looks like SnippetContextProperties.java and SnippetContextPropertiesDeserializer.java can be deleted?

@angelozerr angelozerr force-pushed the java-completion-filter-new branch 2 times, most recently from 32f1db4 to f5e3e55 Compare April 8, 2020 20:28
Fixes redhat-developer#265

Signed-off-by: azerr <azerr@redhat.com>
@angelozerr
Copy link
Contributor Author

Also, it looks like SnippetContextProperties.java and SnippetContextPropertiesDeserializer.java can be deleted?

Good catch! Fixed.

@xorye
Copy link

xorye commented Apr 9, 2020

Awesome, I'm good with this being merged

@angelozerr angelozerr merged commit b17f64a into redhat-developer:master Apr 9, 2020
@angelozerr
Copy link
Contributor Author

Thanks @xorye for your great feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Filter for Java (server) snippet
3 participants