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

Qute - support multiple NamespaceResolvers for the same namespace #16759

Closed
5 tasks done
mkouba opened this issue Apr 23, 2021 · 0 comments · Fixed by #16803
Closed
5 tasks done

Qute - support multiple NamespaceResolvers for the same namespace #16759

mkouba opened this issue Apr 23, 2021 · 0 comments · Fixed by #16803
Assignees
Labels
area/qute The template engine kind/enhancement New feature or request
Milestone

Comments

@mkouba
Copy link
Contributor

mkouba commented Apr 23, 2021

Currently, only one NamespaceResolver can be registered for a specific namespace (such as inject or data). The original idea was to keep the implementation simple. However, a NamespaceResolver could implement io.quarkus.qute.WithPriority as the regular value resolvers do so that the resolver with higher priority would take precedence. This would be especially helpful when adding built-in template extensions that can potentially conflict with user-defined extensions.

  • NamespaceResolver implements WithPriority
  • EngineBuilder.addNamespaceResolver() should not throw IllegalArgumentException anymore
  • EvaluatorImpl.evaluate() should iterate over all matching namespace resolvers
  • Template extension methods that share the same namespace needn't be declared on the same class anymore
  • ExtensionMethodGenerator should group the template extension methods that share the same namespace and priority
@mkouba mkouba added kind/enhancement New feature or request area/qute The template engine labels Apr 23, 2021
@mkouba mkouba added this to the 2.0 - main milestone Apr 23, 2021
@mkouba mkouba self-assigned this Apr 23, 2021
mkouba added a commit to mkouba/quarkus that referenced this issue Apr 26, 2021
- resolves quarkusio#16759
- also add built-in StringTemplateExtensions
mkouba added a commit to mkouba/quarkus that referenced this issue Apr 26, 2021
- resolves quarkusio#16759
- also add built-in StringTemplateExtensions
mkouba added a commit to mkouba/quarkus that referenced this issue Apr 27, 2021
- resolves quarkusio#16759
- also add built-in StringTemplateExtensions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/qute The template engine kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant