Package com.google.gwt.core.ext.linker

Examples of com.google.gwt.core.ext.linker.ArtifactSet


   * with the precompile artifacts as input.
   */
  public ArtifactSet invokeLinkForOnePermutation(TreeLogger logger,
      StandardCompilationResult permResult, ArtifactSet permArtifacts)
      throws UnableToCompleteException {
    ArtifactSet workingArtifacts = new ArtifactSet(permArtifacts);
    workingArtifacts.add(permResult);

    for (Linker linker : linkers) {
      if (linker.isShardable()) {
        TreeLogger linkerLogger = logger.branch(TreeLogger.TRACE,
            "Invoking Linker " + linker.getDescription(), null);
        try {
          workingArtifacts.freeze();
          workingArtifacts = linker.link(logger, this, workingArtifacts, true);
        } catch (Throwable e) {
          linkerLogger.log(TreeLogger.ERROR, "Failed to link", e);
          throw new UnableToCompleteException();
        }
      }
    }

    /*
     * Reset linkers so that they don't accidentally carry any state across
     * permutations
     */
    resetLinkers(logger);

    workingArtifacts.freeze();
    return workingArtifacts;
  }
View Full Code Here


    return workingArtifacts;
  }

  public ArtifactSet invokeRelink(TreeLogger logger,
      ArtifactSet newlyGeneratedArtifacts) throws UnableToCompleteException {
    ArtifactSet workingArtifacts = new ArtifactSet(newlyGeneratedArtifacts);

    for (Linker linker : linkers) {
      TreeLogger linkerLogger = logger.branch(TreeLogger.TRACE,
          "Invoking relink on Linker " + linker.getDescription(), null);
      workingArtifacts.freeze();
      try {
        workingArtifacts = linker.relink(linkerLogger, this, workingArtifacts);
      } catch (Throwable e) {
        linkerLogger.log(TreeLogger.ERROR, "Failed to relink", e);
        throw new UnableToCompleteException();
View Full Code Here

  public void testAnyReportFilesPresent() {
    SoycReportLinker soyc = new SoycReportLinker();

    // empty artifact set
    {
      ArtifactSet artifacts = new ArtifactSet();
      assertFalse(soyc.anyReportFilesPresent(artifacts));
    }

    // report files are in /soycReport/compile-report
    {
      ArtifactSet artifacts = new ArtifactSet();
      artifacts.add(emitted("soycReport/compile-report/SoycDashboard-0-index.html"));
      assertTrue(soyc.anyReportFilesPresent(artifacts));
    }

    // report files are in /compile-report
    {
      ArtifactSet artifacts = new ArtifactSet();
      artifacts.add(emitted("compile-report/SoycDashboard-0-index.html"));
      assertTrue(soyc.anyReportFilesPresent(artifacts));
    }

    // no report files, but other files are present
    {
      ArtifactSet artifacts = new ArtifactSet();
      artifacts.add(emitted("blahblah"));
      artifacts.add(emitted("blue/blue/blue"));
      assertFalse(soyc.anyReportFilesPresent(artifacts));
    }
  }
View Full Code Here

    @Override
    public ArtifactSet finish(TreeLogger logger) throws UnableToCompleteException {
      dirty = false;
      // Don't actually compile generated source code;
      return new ArtifactSet();
    }
View Full Code Here

  public static void legacyLink(TreeLogger logger, ModuleDef module,
      Precompilation precompilation, File[] resultFiles, File outDir)
      throws UnableToCompleteException {
    StandardLinkerContext linkerContext = new StandardLinkerContext(logger,
        module, precompilation.getUnifiedAst().getOptions());
    ArtifactSet artifacts = doLink(logger, linkerContext, precompilation,
        resultFiles);
    doProduceLegacyOutput(logger, artifacts, linkerContext, module, outDir);
  }
View Full Code Here

  public static void link(TreeLogger logger, ModuleDef module,
      Precompilation precompilation, File[] resultFiles, File outDir,
      File extrasDir) throws UnableToCompleteException {
    StandardLinkerContext linkerContext = new StandardLinkerContext(logger,
        module, precompilation.getUnifiedAst().getOptions());
    ArtifactSet artifacts = doLink(logger, linkerContext, precompilation,
        resultFiles);
    doProduceOutput(logger, artifacts, linkerContext, module, outDir, extrasDir);
  }
View Full Code Here

      TreeLogger branch = logger.branch(TreeLogger.INFO, "Linking module "
          + module.getName());
      StandardLinkerContext linkerContext = new StandardLinkerContext(branch,
          module, precompilation.getUnifiedAst().getOptions());
      ArtifactSet artifacts = doLink(branch, linkerContext, precompilation,
          resultFiles);

      doProduceOutput(branch, artifacts, linkerContext, module,
          options.getWarDir(), options.getExtraDir());
    }
View Full Code Here

      if (declEntryPts.length == 0) {
        logger.log(TreeLogger.ERROR, "Module has no entry points defined", null);
        throw new UnableToCompleteException();
      }

      ArtifactSet generatedArtifacts = new ArtifactSet();
      DistillerRebindPermutationOracle rpo = new DistillerRebindPermutationOracle(
          module, compilationState, generatedArtifacts,
          new PropertyPermutations(module.getProperties()), genDir,
          generatorResourcesDir);
View Full Code Here

        for (CompilationUnit unit : compilationUnits) {
          additionalRootTypes[i++] = unit.getTypeName();
        }
      }

      ArtifactSet generatorArtifacts = new ArtifactSet();
      DistillerRebindPermutationOracle rpo = new DistillerRebindPermutationOracle(
          module, compilationState, generatorArtifacts,
          new PropertyPermutations(module.getProperties()), genDir,
          generatorResourcesDir);
View Full Code Here

      }

      uncommittedGeneratedCupsByPrintWriter.clear();
      committedGeneratedCups.clear();
      newlyGeneratedTypeNames.clear();
      newlyGeneratedArtifacts = new ArtifactSet();
    }
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.core.ext.linker.ArtifactSet

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.