StringTemplate 3.0 Release Notes
Brought to you by that maniac that brings you the ANTLR parser generator!
...
3.0 should be a drop-in replacement for those using ST for websites and code generation with a few minor potential incompatibilities as noted below. Also see the change list. The biggest issue is that now angle brackets are the default delimiter for StringTemplate groups.
Enhancements
- Added interfaces. See unit tests and http://www.cs.usfca.edu/~parrt/papers/ST.pdf.
You can say "optional template(args);" also. Uses group loader to find interfaces.No Format group Java implements ANTLRCoreTarget; rule(...) ::= "..." ...
...
- Added STG.getInstanceOf(name,attributes)
Backward incompatibilities
The following changes were worth making despite causing some backward compatibilities for some users.
...
This made the ASTExpr.write separator computation much simpler and allowed me to properly handle the new "null" option.
Bug Fixes
- allow different source of classloader:
No Format InputStream is = cl.getResourceAsStream(fileName); if ( is==null ) \{ cl = ErrorManager.class.getClassLoader(); is = cl.getResourceAsStream(fileName); }
...