[stringtemplate-interest] [ST4 Beta-4] Retrieving version information
Udo Borkowski
ub at abego-software.de
Mon Feb 7 06:25:46 PST 2011
Hi,
what about providing "version information" to be used in a template?
I got this idea because I was using an older version of the engine (Beta3 instead of Beta4) without noticing.
One could then use this information e.g. to include a text like
"(Rendered with StringTemplate 4.0 Beta-4)"
into generated web pages etc.
One way to achieve this without adding "build-in" attributes etc. could be extending the class ST.
E.g. add the following method to the class ST:
public String getVersionText() {
return "StringTemplate 4.0 Beta-4";
}
Then one could use
(Rendered with <{ }.versionText>)
in a template to render
(Rendered with StringTemplate 4.0 Beta-4)
Udo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/stringtemplate-interest/attachments/20110207/8264be77/attachment.html
More information about the stringtemplate-interest
mailing list