Community
Participate
Working Groups
TemplateSet - i would like to use it. would it be possible to provide interface like (or sth similar)? (stream management should be done within TemplateSet) TemplateSet ts= new TemplateSet(); ts.read(file); //file is instanceof IFile Template[] temps= ts.getTemplates(); does not have to be exactly this - something similar will do. what i want to be able to do is: - read templates from a file - parse template(s) from a given String object - substitute keys (the ${xxx} things) for some real values (and support to substitute them all properly) - write templates to a file ask me if you need more info
need more info on this. What are you trying to achieve
Adam is trying to use templates for generating classes like <MyPackage>Messages for NLS.
fixed > 208 For reading templates, you can do: TemplateSet set= new TemplateSet(); set.addFromFile(new File("templates.xml")); Template[] templates= set.getTemplates(); For interpolating templates, you have to use the TemplateInterpolator parser and implement a TemplateEvaluator which is fed by the parser.