[
https://issues.apache.org/jira/browse/CAMEL-4028?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13073348#comment-13073348
]
Claus Ibsen commented on CAMEL-4028:
------------------------------------
Taariq that is a good start.
It would be great if we could somehow globally configure the prefix/suffix
tokens on the simple language, so you do not need to provide those each time.
We should add API on CamelContext to add a language
- addLanguage(String name, Language language)
Then people can use that in Java to configure it globally
{code}
SimpleLanguage simple = new SimpleLanguage();
simple.setPrefixToken("[");
simple.setSuffixToken("[");
context.addLanguage("simple", simple);
{code}
In XML DSL you can do with a <bean> tag, and that's it:
{code:xml}
<bean id="simple" class="org.apache.camel.language.SimpleLanguage">
<property name="prefixToken" value="["/>
<property name="suffixToken" value="]"/>
</bean>
{code}
> Simple language - Allow to configure prefix and suffix tokens
> -------------------------------------------------------------
>
> Key: CAMEL-4028
> URL: https://issues.apache.org/jira/browse/CAMEL-4028
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Affects Versions: 2.7.0
> Reporter: Claus Ibsen
> Priority: Minor
> Fix For: 2.9.0, Future
>
> Attachments:
> CAMEL-4028_Simple_language_-_Allow_to_configure_prefix_and_suffix_tokens1.patch
>
>
> The simple language uses ${ } tokens by default. However groovy uses those
> for its GString. So we have a clash. Even if you use $simple{ } instead in
> Groovy then you have a clash.
> So we should add support for configuring the tokens so you can remedy the
> GString clash in Groovy.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira