Package com.google.gxp.compiler.codegen

Examples of com.google.gxp.compiler.codegen.DefaultCodeGeneratorFactory


  /**
   * Returns the CodeGeneratorFactory to use when compiling.
   */
  protected CodeGeneratorFactory getCodeGeneratorFactory() {
    return new DefaultCodeGeneratorFactory();
  }
View Full Code Here


    SchemaFactory schemaFactory = BuiltinSchemaFactory.INSTANCE;
    Parser parser = new Parser(schemaFactory, SaxXmlParser.INSTANCE,
                               new FileSystemEntityResolver(fs));
    CompilationSet cSet =
        new CompilationSet.Builder(parser,
                                   new DefaultCodeGeneratorFactory(),
                                   SimpleCompilationManager.INSTANCE)
        .build(gxpFileRef);

    cSet.compile(alertSink, DefaultAlertPolicy.INSTANCE,
                 ImmutableList.copyOf(outputLanguages));
View Full Code Here

*/
public class I18nErrorTest extends BaseTestCase {
  private final DefaultCodeGeneratorFactory codeGeneratorFactory;

  public I18nErrorTest() {
    codeGeneratorFactory = new DefaultCodeGeneratorFactory();
    codeGeneratorFactory.setRuntimeMessageSource("com.google.foo.bar");
  }
View Full Code Here

    // use the sourcePathFs so that gxp:///foo/bar is resolved in a way that
    // includes both source files and genfiles
    sourceEntityResolver = new FileSystemEntityResolver(sourcePathFs);

    // Compute CodeGeneratorFactory (Always do this last)
    codeGeneratorFactory = new DefaultCodeGeneratorFactory();
    codeGeneratorFactory.setRuntimeMessageSource(commandLine.FLAG_message_source);
    codeGeneratorFactory.setDynamicModeEnabled(commandLine.FLAG_dynamic);
    codeGeneratorFactory.setSourceFiles(getSourceFiles());
    codeGeneratorFactory.setSchemaFiles(getSchemaFiles());
    codeGeneratorFactory.setSourcePaths(sourcePaths);
View Full Code Here

    // use the sourcePathFs so that gxp:///foo/bar is resolved in a way that
    // includes both source files and genfiles
    sourceEntityResolver = new FileSystemEntityResolver(sourcePathFs);

    // Compute CodeGeneratorFactory (Always do this last)
    codeGeneratorFactory = new DefaultCodeGeneratorFactory();
    codeGeneratorFactory.setRuntimeMessageSource(target);
    codeGeneratorFactory.setDynamicModeEnabled(dynamic);
    codeGeneratorFactory.setSourceFiles(getSourceFiles());
    codeGeneratorFactory.setSchemaFiles(getSchemaFiles());
    codeGeneratorFactory.setSourcePaths(sourcePaths);
View Full Code Here

public class UnextractableContentAlertTest extends BaseTestCase {
  private final DefaultCodeGeneratorFactory codeGeneratorFactory;
  private final List<String> extraHeaders = Lists.newArrayList();

  public UnextractableContentAlertTest() {
    codeGeneratorFactory = new DefaultCodeGeneratorFactory();
    codeGeneratorFactory.setRuntimeMessageSource("com.google.foo.bar");
  }
View Full Code Here

*/
public class DynamicTest extends BaseRunningTestCase {

  @Override
  protected DefaultCodeGeneratorFactory getCodeGeneratorFactory() {
    DefaultCodeGeneratorFactory codeGeneratorFactory = super.getCodeGeneratorFactory();
    codeGeneratorFactory.setDynamicModeEnabled(true);
    return codeGeneratorFactory;
  }
View Full Code Here

    assertDynamicModeEnabledEquals(true, config);
  }

  private void assertMessageSourceEquals(String expected,
                                         Configuration config) {
    DefaultCodeGeneratorFactory codeGenFactory =
        (DefaultCodeGeneratorFactory) config.getCodeGeneratorFactory();
    assertEquals(expected, codeGenFactory.getRuntimeMessageSource());
  }
View Full Code Here

    assertEquals(expected, codeGenFactory.getRuntimeMessageSource());
  }

  private void assertDynamicModeEnabledEquals(boolean expected,
                                              Configuration config) {
    DefaultCodeGeneratorFactory codeGenFactory =
        (DefaultCodeGeneratorFactory) config.getCodeGeneratorFactory();
    assertEquals(expected, codeGenFactory.isDynamicModeEnabled());
  }
View Full Code Here

    // use the sourcePathFs so that gxp:///foo/bar is resolved in a way that
    // includes both source files and genfiles
    sourceEntityResolver = new FileSystemEntityResolver(sourcePathFs);

    // Compute CodeGeneratorFactory (Always do this last)
    codeGeneratorFactory = new DefaultCodeGeneratorFactory();
    codeGeneratorFactory.setRuntimeMessageSource(target);
    codeGeneratorFactory.setDynamicModeEnabled(dynamic);
    codeGeneratorFactory.setSourceFiles(getSourceFiles());
    codeGeneratorFactory.setSchemaFiles(getSchemaFiles());
    codeGeneratorFactory.setSourcePaths(sourcePaths);
View Full Code Here

TOP

Related Classes of com.google.gxp.compiler.codegen.DefaultCodeGeneratorFactory

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.