Package groovy.text.markup

Examples of groovy.text.markup.TemplateConfiguration


  }

  public class TestTemplateEngine extends MarkupTemplateEngine {

    public TestTemplateEngine() {
      super(new TemplateConfiguration());
    }
View Full Code Here


    TemplateEngine engine = this.configurer.getTemplateEngine();
    assertNotNull(engine);
    assertEquals(MarkupTemplateEngine.class, engine.getClass());

    MarkupTemplateEngine markupEngine = (MarkupTemplateEngine) engine;
    TemplateConfiguration configuration = markupEngine.getTemplateConfiguration();
    assertNotNull(configuration);
    assertEquals(GroovyMarkupConfigurer.class, configuration.getClass());
  }
View Full Code Here

    TemplateEngine engine = this.configurer.getTemplateEngine();
    assertNotNull(engine);
    assertEquals(MarkupTemplateEngine.class, engine.getClass());

    MarkupTemplateEngine markupEngine = (MarkupTemplateEngine) engine;
    TemplateConfiguration configuration = markupEngine.getTemplateConfiguration();
    assertNotNull(configuration);
    assertFalse(configuration.isCacheTemplates());
  }
View Full Code Here

  }

  private class TestTemplateEngine extends MarkupTemplateEngine {

    public TestTemplateEngine() {
      super(new TemplateConfiguration());
    }
View Full Code Here

  @SuppressWarnings("UnusedDeclaration")
  @Provides
  @Singleton
  MarkupTemplateEngine provideTemplateEngine(LaunchConfig launchConfig, Config config) {
    ClassLoader parent = getClass().getClassLoader();
    TemplateConfiguration effectiveConfiguration = new TemplateConfiguration(config);
    effectiveConfiguration.setCacheTemplates(config.isCacheTemplates()); // not copied by constructor
    Path templatesDir = launchConfig.getBaseDir().file(config.getTemplatesDirectory());
    return new MarkupTemplateEngine(parent, effectiveConfiguration, new CachingTemplateResolver(templatesDir));
  }
View Full Code Here

TOP

Related Classes of groovy.text.markup.TemplateConfiguration

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.