intellij-quarkus
                                
                                
                                
                                    intellij-quarkus copied to clipboard
                            
                            
                            
                        Initial live template support
Added live templates suggested in #11 and others.
Suggested:
qds: JDBC datasource in propertiesijt: Inject a CDI beanconf: Inject a config propertypdm: Create a CDI producer methodasd:@ApplicationScopedrsd:@RequestScopeddep:@Dependentpct: Create an initializer methodpds: Create an pre-destroy methodtn:@Transactionalph:@Pathprojson:@Produces(MediaType.APPLICATION_JSON)conjson:@Consumes(MediaType.APPLICATION_JSON)getm:@GETmethod
Codecov Report
Merging #74 into master will decrease coverage by
0.17%. The diff coverage is0.00%.
@@             Coverage Diff              @@
##             master      #74      +/-   ##
============================================
- Coverage     52.44%   52.27%   -0.18%     
  Complexity      389      389              
============================================
  Files            59       61       +2     
  Lines          1798     1804       +6     
  Branches        286      286              
============================================
  Hits            943      943              
- Misses          768      774       +6     
  Partials         87       87              
| Impacted Files | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| ...Templates/QuarkusApplicationPropertiesContext.java | 0.00% <0.00%> (ø) | 
0.00 <0.00> (?) | 
|
| ...eTemplates/QuarkusApplicationTemplateProvider.java | 0.00% <0.00%> (ø) | 
0.00 <0.00> (?) | 
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update debccec...8ac8364. Read the comment docs.
@sdaschner I close this PR for snippets support, the main idea is that it the language server which manages snippets (like MicroProfile LS / Qute LS, etc) and not the LSP client (Intellij in this case).
Managing snippet on language server side gives the capability:
- to show snippet not anywhere (according the AST node manages on language server)
 - any LSP client can benefit about those snippets, in other words snippets are consistent.
 
The write of snippet are written in JSON by using the LSP snippet syntax. See for instance for Quarkus
- snippets in java file https://github.com/redhat-developer/quarkus-ls/blob/master/quarkus.ls.ext/com.redhat.quarkus.ls/src/main/resources/com/redhat/quarkus/snippets/quarkus-java.json in Java file.
 - snippets in application.properties file https://github.com/redhat-developer/quarkus-ls/blob/master/quarkus.ls.ext/com.redhat.quarkus.ls/src/main/resources/com/redhat/quarkus/snippets/quarkus-properties.json
 
The only main problem with Intellij LSP client is that it doesn't support Templates variables which is very bad for snippets. I created the issue at https://github.com/redhat-developer/intellij-quarkus/issues/786
@sdaschner if you wish support your snippets, please contribute to Quarkus LS JSON snippets. Thanks.
I close this issue.