Package com.google.gwt.dev

Examples of com.google.gwt.dev.CompilerOptions


    ModuleDef module;
    try {
      module = loadModule(compileLogger);

      logger.log(TreeLogger.INFO, "Loading Java files in " + inputModuleName + ".");
      CompilerOptions loadOptions = new CompilerOptionsImpl(compileDir, inputModuleName, options);
      compilerContext = compilerContextBuilder.options(loadOptions).unitCache(
          Compiler.getOrCreateUnitCache(logger, loadOptions)).build();

      // Loads and parses all the Java files in the GWT application using the JDT.
      // (This is warmup to make compiling faster later; we stop at this point to avoid
View Full Code Here


  private boolean doCompile(TreeLogger compileLogger, CompileDir compileDir, Job job)
      throws UnableToCompleteException {

    job.onProgress("Loading modules");

    CompilerOptions loadOptions = new CompilerOptionsImpl(compileDir, inputModuleName, options);
    compilerContext = compilerContextBuilder.options(loadOptions).build();

    ModuleDef module = loadModule(compileLogger);

    // We need to generate the stub before restricting permutations
    String recompileJs = generateModuleRecompileJs(module, compileLogger);

    Map<String, String> bindingProperties = restrictPermutations(compileLogger, module,
        job.getBindingProperties());

    // Propagates module rename.
    String newModuleName = module.getName();
    outputModuleName.set(newModuleName);

    // Check if we can skip the compile altogether.
    InputSummary input = new InputSummary(bindingProperties, module);
    if (input.equals(lastBuildInput)) {
      compileLogger.log(Type.INFO, "skipped compile because no input files have changed");
      job.setCompileStrategy(CompileStrategy.SKIPPED);
      return true;
    }
    // Force a recompile if we don't succeed.
    lastBuildInput = null;

    job.onProgress("Compiling");
    // TODO: use speed tracer to get more compiler events?

    CompilerOptions runOptions = new CompilerOptionsImpl(compileDir, newModuleName, options);
    compilerContext = compilerContextBuilder.options(runOptions).build();

    // Looks up the matching rebuild cache using the final set of overridden binding properties.
    MinimalRebuildCache knownGoodMinimalRebuildCache =
        getKnownGoodMinimalRebuildCache(bindingProperties);
View Full Code Here

    ModuleDef module = loadModule(compileLogger, bindingProperties);
    String newModuleName = module.getName(); // includes any rename
    moduleName.set(newModuleName);


    CompilerOptions options = new CompilerOptionsImpl(compileDir, newModuleName);

    boolean success = new Compiler(options).run(compileLogger, module);
    lastBuild.set(compileDir);
    if (!success) {
      compileLogger.log(TreeLogger.Type.ERROR, "Compiler returned " + success);
View Full Code Here

TOP

Related Classes of com.google.gwt.dev.CompilerOptions

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.