forked from redhat-developer/quarkus-ls
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
qute(NoMatchingTemplate) if using @CheckedTemplate with basePath
Fixes redhat-developer/vscode-quarkus#787 Signed-off-by: azerr <[email protected]>
- Loading branch information
1 parent
52de798
commit dda2ab3
Showing
17 changed files
with
320 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
...cts/maven/qute-quickstart/src/main/java/org/acme/qute/ItemResourceWithCustomBasePath.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package org.acme.qute; | ||
|
||
import java.math.BigDecimal; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
import javax.ws.rs.GET; | ||
import javax.ws.rs.Path; | ||
import javax.ws.rs.Produces; | ||
import javax.ws.rs.core.MediaType; | ||
|
||
import io.quarkus.qute.CheckedTemplate; | ||
import io.quarkus.qute.TemplateExtension; | ||
import io.quarkus.qute.TemplateInstance; | ||
|
||
@Path("items3") | ||
public class ItemResourceWithCustomBasePath { | ||
|
||
@CheckedTemplate(basePath="ItemResourceWithFragment") | ||
static class Templates { | ||
static native TemplateInstance items(List<Item> items); | ||
static native TemplateInstance items$id1(List<Item> items); | ||
static native TemplateInstance items3$id2(List<Item> items); | ||
static native TemplateInstance items3$(List<Item> items); | ||
} | ||
|
||
@GET | ||
@Produces(MediaType.TEXT_HTML) | ||
public TemplateInstance get() { | ||
List<Item> items = new ArrayList<>(); | ||
items.add(new Item(new BigDecimal(10), "Apple")); | ||
items.add(new Item(new BigDecimal(16), "Pear")); | ||
items.add(new Item(new BigDecimal(30), "Orange")); | ||
return Templates.items(items); | ||
} | ||
|
||
|
||
} |
15 changes: 15 additions & 0 deletions
15
...ojects/maven/qute-quickstart/src/main/java/org/acme/qute/ItemTemplatesCustomBasePath.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package org.acme.qute; | ||
|
||
import java.util.List; | ||
import io.quarkus.qute.CheckedTemplate; | ||
import io.quarkus.qute.TemplateInstance; | ||
|
||
@CheckedTemplate(basePath="ItemResourceWithFragment") | ||
public class ItemTemplatesCustomBasePath { | ||
|
||
static native TemplateInstance items(List<Item> items); | ||
static native TemplateInstance items$id1(List<Item> items); | ||
static native TemplateInstance items3$id2(List<Item> items); | ||
static native TemplateInstance items3$(List<Item> items); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.