Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » How to escape ${expr} in JET templates?
How to escape ${expr} in JET templates? [message #492568] Tue, 20 October 2009 19:09 Go to next message
Asha Ramegowda is currently offline Asha RamegowdaFriend
Messages: 77
Registered: July 2009

We need to have some placeholders in the form of ${place holder} in our template files. But JET recognizes the ${some name} as a variable. Is there any way to escape this string or the $ symbol in JET?

Thank you,

Re: How to escape ${expr} in JET templates? [message #492578 is a reply to message #492568] Tue, 20 October 2009 19:46 Go to previous message
Paul Elder is currently offline Paul ElderFriend
Messages: 849
Registered: July 2009
Senior Member

${ '${place holder}' }

That is, put the ${ ... } text into quotes within another ${ ... }.

You can use double or single quotes.

If you need to escape a quote, double it up:

Example: To embed ${"hello world"} in the template output, do

${ "${""hello world""}" }

Or, you could break it up like this:

${ "${" }"hello world"}

I confess that not of these look particularly readable.

Quoting strategy shamelessly stolen from JSP/EL

Previous Topic:Xtend: How to collect all visible instances of xpand::Type?
Next Topic:[JET] Jet editor still now working in Galileo
Goto Forum:

Current Time: Sun Nov 27 00:03:48 GMT 2022

Powered by FUDForum. Page generated in 0.02599 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top