[stringtemplate-interest] StringTemplateGroup restricts the location of the templates
Terence Parr
parrt at cs.usfca.edu
Mon Mar 30 14:43:33 PDT 2009
Hi. isn't there a Reader-based StringTemplate ctor? good you load
your template using that?
Ter
On Mar 26, 2009, at 3:24 AM, David Hofmann wrote:
> Hi all,
>
> As far as I can see, for a template to reference another one it must
> to be in the same StringTemplateGroup (stg) which is fine except for
> the fact that stg only allows you to load templates from files ( of
> the filesystem or the classpath )
>
> I really need to do something like this:
>
> StringTemplate st = new
> StringTemplate
> (templateThatComesFromTheMoonOrWhereverElseButNotTheFileSystem);
> StringTemplateGroup stg = new StringTemplateGroup(); // stg does not
> have this contructor
> stg.loadTemplate("moontemplate", st); // stg does not have this method
>
> If I need to refresh the template, then I will call loadTemplate
> again and that's it
>
> Does this make sense ?
> Is there a reason why we shoun't do this ?
> Or is it already there and I am the one that didn't dig on it enough
> to find it ?
>
> I hope that this is not a too stupid post
> Thanks in advance
>
> --
> David Daniel Hofmann
> WebVAS, Nucleo S.A. - Telecom Personal Paraguay
> http://hofmanndavid.blogspot.com/
>
>
>
> _______________________________________________
> stringtemplate-interest mailing list
> stringtemplate-interest at antlr.org
> http://www.antlr.org/mailman/listinfo/stringtemplate-interest
More information about the stringtemplate-interest
mailing list