Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

No Format
StringTemplateGroup mysuper = new StringTemplateGroup("mysupergrp", "/somepath/master");
StringTemplateGroup mysub = new StringTemplateGroup("mysubgrp" , "/somepath/sub");
mysub.setSuperGroup(mysuper);
....

* A group's supergroup can be set to be set to some other group dynamically, if need be.

  • Contrast the method of setting supergroup shown here versus the inheritance syntax in stg files (below).

...

  • Inheritance connection is made by the group statement in the stg file of the sub-group. This provides the name of the super-group for StringTemplate to look for in the list of StringTemplateGroups currently loaded. (ie: there is no mechanism for automatically loading a mentioned super-group file (Is this correct? --GW), though there is an interface defined for this if you would like to implement one.)
  • See the separate ST condensed - File syntax article for the format of an stg file.

Next: ST condensed -- Templates and expressions