Package com.google.gwt.dev

Examples of com.google.gwt.dev.CompilerContext$Builder


      // It has to wait until now because we need to inject javascript.
      //
      Rules rules = module.getRules();
      PrecompileTaskOptionsImpl options = new PrecompileTaskOptionsImpl();
      options.setGenDir(genDir);
      CompilerContext compilerContext =
          new CompilerContext.Builder().module(module).options(options).build();
      StandardGeneratorContext genCtx =
          new StandardGeneratorContext(compilerContext, compilationState, new ArtifactSet(), false);

      // Only enable generator result caching if we have a valid rebindCache
View Full Code Here


  public static JProgram construct(TreeLogger logger, final CompilationState state,
      PrecompileTaskOptions options, ConfigProps config) throws UnableToCompleteException {

    InternalCompilerException.preload();

    CompilerContext compilerContext = new CompilerContext.Builder().options(options)
        .minimalRebuildCache(new NullRebuildCache()).build();

    RebindPermutationOracle rpo = new RebindPermutationOracle() {
      @Override
      public void clear() {
      }

      @Override
      public String[] getAllPossibleRebindAnswers(TreeLogger logger, String sourceTypeName)
          throws UnableToCompleteException {
        return new String[0];
      }

      @Override
      public CompilationState getCompilationState() {
        return state;
      }

      @Override
      public StandardGeneratorContext getGeneratorContext() {
        return null;
      }
    };

    JProgram jprogram = new JProgram(compilerContext.getMinimalRebuildCache());
    JsProgram jsProgram = new JsProgram();
    UnifyAst unifyAst = new UnifyAst(logger, compilerContext, jprogram, jsProgram, rpo);
    unifyAst.buildEverything();

    // Compute all super type/sub type info
View Full Code Here

    super.setUp();

    MortalLogger logger = MortalLogger.NULL;

    CompilationState state = CompilationStateBuilder.buildFrom(
        logger.getTreeLogger(), new CompilerContext(), UiJavaResources.getUiResources());
    TypeOracle types = state.getTypeOracle();

    FieldReferenceConverter converter = new FieldReferenceConverter(null);
    IntAttributeParser intParser = new IntAttributeParser(converter,
        types.parse("int"), logger);
View Full Code Here

    super.setUp();

    MortalLogger logger = MortalLogger.NULL;

    CompilationState state = CompilationStateBuilder.buildFrom(
        logger.getTreeLogger(), new CompilerContext(), UiJavaResources.getUiResources());
    TypeOracle types = state.getTypeOracle();

    FieldReferenceConverter converter = new FieldReferenceConverter(null);
    DoubleAttributeParser doubleParser = new DoubleAttributeParser(converter,
        types.parse("double"), logger);
View Full Code Here

  @Override
  public void setUp() throws Exception {
    super.setUp();
    CompilationState state = CompilationStateBuilder.buildFrom(
        TreeLogger.NULL, new CompilerContext(), UiJavaResources.getUiResources());
    TypeOracle types = state.getTypeOracle();
    parser = new VerticalAlignmentConstantParser(new FieldReferenceConverter(
        null), types.parse(VAC), MortalLogger.NULL);
  }
View Full Code Here

  @Override
  public void setUp() throws Exception {
    super.setUp();
    CompilationState state = CompilationStateBuilder.buildFrom(
        TreeLogger.NULL, new CompilerContext(), UiJavaResources.getUiResources());
    TypeOracle types = state.getTypeOracle();
    parser = new VerticalAlignmentConstantParser(new FieldReferenceConverter(
        null), types.parse(HVA + ".VerticalAlignmentConstant"),
        MortalLogger.NULL);
  }
View Full Code Here

  @Override
  public void setUp() throws Exception {
    super.setUp();
    CompilationState state = CompilationStateBuilder.buildFrom(TreeLogger.NULL,
        new CompilerContext(), UiJavaResources.getUiResources());
    TypeOracle types = state.getTypeOracle();
    parser = new HorizontalAlignmentConstantParser(new FieldReferenceConverter(
        null), types.parse(HHA + ".HorizontalAlignmentConstant"),
        MortalLogger.NULL);
  }
View Full Code Here

  private static MessageInterface getMessageInterfaceInstance() {
    JClassType classType;
    TreeLogger logger = new FailErrorLogger();
    try {
      CompilerContext.Builder compilerContextBuilder = new CompilerContext.Builder();
      CompilerContext compilerContext = compilerContextBuilder.build();
      ModuleDef module = ModuleDefLoader.loadFromClassPath(logger,
          compilerContext, Child.class.getPackage().getName() + ".Testing");
      compilerContext = compilerContextBuilder.module(module).build();
      CompilationState compilationState = module.getCompilationState(logger, compilerContext);
      TypeOracle typeOracle = compilationState.getTypeOracle();
View Full Code Here

  @Override
  public void setUp() throws Exception {
    super.setUp();
    CompilationState state = CompilationStateBuilder.buildFrom(
        TreeLogger.NULL, new CompilerContext(), UiJavaResources.getUiResources());
    TypeOracle types = state.getTypeOracle();
    parser = new TextAlignConstantParser(new FieldReferenceConverter(null),
        types.parse(TAC), MortalLogger.NULL);
  }
View Full Code Here

    resources.add(new RealJavaResource(Tokenizer3.class));
    resources.add(new RealJavaResource(Tokenizer4.class));
    resources.addAll(Arrays.asList(extraResources));
    try {
      return CompilationStateBuilder.buildFrom(
          createCompileLogger(), new CompilerContext(), resources).getTypeOracle();
    } catch (UnableToCompleteException e) {
      throw new RuntimeException(e);
    }
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.dev.CompilerContext$Builder

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.