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
Member
Hi,

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,

Asha.
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
Asha:

${ '${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

Paul
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: Thu Oct 03 20:33:26 GMT 2024

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

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

Back to the top