stringtemplate4 icon indicating copy to clipboard operation
stringtemplate4 copied to clipboard

STGroup to load/import templates from streams

Open bedla opened this issue 10 years ago • 3 comments

Hi, it would be nice to have ability to load/import STGroups from streams. Currently I use it to cache String of template loaded from stream loaded using java.lang.ClassLoader#getResourceAsStream(). I want to eliminate IO operations currently implemented in org.stringtemplate.v4.STGroup#importTemplates(...). Something like "template definitions registry". Could you consider this. Thx Ivos

bedla avatar Mar 31 '14 11:03 bedla

Hi. It seems like we must have something that lets this happen now. Let me look. how about STGroupString?

parrt avatar Mar 31 '14 18:03 parrt

Currently I use STGroupString but when it imports (eg. import "/fuu.stg") other groups it loads it using stgroupfile which does IO ops.

bedla avatar Mar 31 '14 18:03 bedla

Oh. crap.

parrt avatar Apr 01 '14 17:04 parrt