redhat-developer / redhat-developer/quarkus-ls
Improve generation of TemplateExtension with code action
Open
@datho7561 is already working on this.
Since Jul 28, 2022.
code action
enhancement
qute
- Dominant language
- Java
- Stars
- 50
- Forks
- 18
- Avg merge
- 22h 11m
- Merged PRs (30d)
- 3
Description
Given this Qute template:
{book.XXXX}
The code action which generate the template extension method in a new class will look like this:
@io.quarkus.qute.TemplateExtension
public class TemplateExtensions {
public static String XXXX(org.agoncal.article.qutepanache.Book book) {
return null;
}
}
We should improve:
- generate a package but which strategy can ve adopt it to get a package from sources ? In the future perhaps we should have a popup to fill the package + class name of the template extension.
- add a line space after the TemplateExtensions
public class TemplateExtensions {
public static String XXXX(org.agoncal.article.qutepanache.Book book) {
- generate import of the Book page to avoid using full qualified name in the parameter.
In other words:
package org.acme;
import org.agoncal.article.qutepanache.Book;
@io.quarkus.qute.TemplateExtension
public class TemplateExtensions {
public static String XXXX(Book book) {
return null;
}
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.