[stringtemplate-interest] String template group inheritance

Davide Poletti dav.poletti at gmail.com
Wed Nov 10 05:19:54 PST 2010


Hi, 

I' ve some problems with String Template Group inheritance.

I define a super group in one file IOop.stg

group IOop;

temp(attr1) ::=<< ....>>

and the sugroup in file Read.stg:

group Read : IOop;

temp2()::=<<....>>


But when I run 

StringTemplateGroup stg = StringTemplateUtil.loadTemplate("Read.stg");
logger.debug(stg.getSuperGroup().toString());
StringTemplate st = stg.getSuperGroup().getTemplateDefinition("temp");

I got an error since stg.getSuperGroup() seems to return null, where I
did wrong???

Davide


More information about the stringtemplate-interest mailing list