Package org.groovymud.utils.text

Examples of org.groovymud.utils.text.IncludeTemplateEngine


    ExtendedTerminalIO stream = looker.getTerminalOutput();
    Map binding = new HashMap();
    binding.put("it", target);
    binding.put("looker", looker);
    TemplateEngine engine = new IncludeTemplateEngine();
    try {
      // auto import some utils
      String header = "<%import static org.groovymud.utils.WordUtils.*;\nimport static org.groovymud.utils.NumberToWordConverter.*%>";
      Template template = engine.createTemplate(header + text);

      stream.writeln(colorizeText(template.make(binding).toString(), BOLD));
    } catch (CompilationFailedException e) {
      logger.error(e, e);
    } catch (ClassNotFoundException e) {
View Full Code Here


    ExtendedTerminalIO stream = looker.getTerminalOutput();
    Map binding = new HashMap();
    binding.put("it", target);
    binding.put("looker", looker);
    TemplateEngine engine = new IncludeTemplateEngine();
    try {
      //auto import some utils
      String header = "<%import static org.groovymud.utils.WordUtils.*;\nimport static org.groovymud.utils.NumberToWordConverter.*%>";
      Template template = engine.createTemplate(header + text);

      stream.writeln(colorizeText(template.make(binding).toString(), BOLD));
    } catch (CompilationFailedException e) {
      logger.error(e, e);
    } catch (ClassNotFoundException e) {
View Full Code Here

TOP

Related Classes of org.groovymud.utils.text.IncludeTemplateEngine

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.