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

Examples of com.google.gwt.core.ext.linker.impl.StandardLinkerContext


  }

  public static ArtifactSet link(TreeLogger logger, ModuleDef module,
      Precompilation precompilation, File[] resultFiles)
      throws UnableToCompleteException {
    StandardLinkerContext linkerContext = new StandardLinkerContext(logger,
        module, precompilation.getUnifiedAst().getOptions());
    return doLink(logger, linkerContext, precompilation, resultFiles);
  }
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,
View Full Code Here

    File moduleOutDir = new File(options.getWarDir(), module.getName());
    File moduleExtraDir = (options.getExtraDir() == null) ? null : new File(
        options.getExtraDir(), module.getName());

    // Create a new active linker stack for the fresh link.
    StandardLinkerContext linkerStack = new StandardLinkerContext(linkLogger,
        module, options);
    linkerStacks.put(module.getName(), linkerStack);

    ArtifactSet artifacts = linkerStack.invokeLink(linkLogger);
    linkerStack.produceOutputDirectory(linkLogger, artifacts, moduleOutDir,
        moduleExtraDir);
  }
View Full Code Here

    File moduleOutDir = new File(options.getWarDir(), module.getName());
    File moduleExtraDir = (options.getExtraDir() == null) ? null : new File(
        options.getExtraDir(), module.getName());

    // Find the existing linker stack.
    StandardLinkerContext linkerStack = linkerStacks.get(module.getName());
    assert linkerStack != null;

    ArtifactSet artifacts = linkerStack.invokeRelink(linkLogger,
        newlyGeneratedArtifacts);
    linkerStack.produceOutputDirectory(linkLogger, artifacts, moduleOutDir,
        moduleExtraDir);
  }
View Full Code Here

  private String genSelectionScript(TreeLogger logger, String moduleName)
      throws UnableToCompleteException {
    logger.log(TreeLogger.TRACE,
        "Generating a script selection script for module " + moduleName);

    StandardLinkerContext context = new StandardLinkerContext(logger,
        getModuleDef(logger, moduleName), new JJSOptionsImpl());
    HostedModeLinker linker = new HostedModeLinker();
    return linker.generateSelectionScript(logger, context,
        context.getArtifacts());
  }
View Full Code Here

      throws UnableToCompleteException {
    TreeLogger linkLogger =
        logger.branch(TreeLogger.DEBUG, "Linking module '" + module.getName() + "'");

    // Create a new active linker stack for the fresh link.
    StandardLinkerContext linkerStack = new StandardLinkerContext(
        linkLogger, module, compilerContext.getPublicResourceOracle(), options.getOutput());
    ArtifactSet artifacts = linkerStack.getArtifactsForPublicResources(logger, module);
    artifacts = linkerStack.invokeLegacyLinkers(linkLogger, artifacts);
    artifacts = linkerStack.invokeFinalLink(linkLogger, artifacts);
    produceOutput(linkLogger, linkerStack, artifacts, module, false);
    return linkerStack;
  }
View Full Code Here

   */
  protected abstract void warnAboutNoStartupUrls();

  private ArtifactAcceptor createArtifactAcceptor(TreeLogger logger, final ModuleDef module)
      throws UnableToCompleteException {
    final StandardLinkerContext linkerContext = link(logger, module);
    return new ArtifactAcceptor() {
      @Override
      public void accept(TreeLogger relinkLogger, ArtifactSet newArtifacts)
          throws UnableToCompleteException {
        relink(relinkLogger, linkerContext, module, newArtifacts);
View Full Code Here

      ModuleDef module =
          ModuleDefLoader.loadFromClassPath(logger, compilerContext, moduleName);
      compilerContext = compilerContextBuilder.module(module).build();

      StandardLinkerContext linkerContext = new StandardLinkerContext(
          TreeLogger.NULL, module, compilerContext.getPublicResourceOracle(), options.getOutput());

      boolean generateOnShards = true;

      if (!options.isEnabledGeneratingOnShards()) {
        logger.log(TreeLogger.INFO, "Precompiling on the start node");
        generateOnShards = false;
      } else if (!linkerContext.allLinkersAreShardable()) {
        TreeLogger legacyLinkersLogger =
            logger.branch(TreeLogger.INFO,
                "Precompiling on the start node, because some linkers are not updated");
        if (legacyLinkersLogger.isLoggable(TreeLogger.INFO)) {
          for (Linker linker : linkerContext.findUnshardableLinkers()) {
            legacyLinkersLogger.log(TreeLogger.INFO, "Linker"
                + linker.getClass().getCanonicalName() + " is not updated");
          }
        }
        generateOnShards = false;
View Full Code Here

      ArtifactSet generatedArtifacts, Permutation[] permutations,
      List<PersistenceBackedObject<PermutationResult>> resultFiles,
      Set<PermutationResult> libraries, PrecompileTaskOptions precompileOptions,
      LinkOptions linkOptions)
      throws UnableToCompleteException, IOException {
    StandardLinkerContext linkerContext =
        new StandardLinkerContext(logger, module, publicResourceOracle,
            precompileOptions.getOutput());
    ArtifactSet artifacts = doSimulatedShardingLink(
        logger, module, linkerContext, generatedArtifacts, permutations, resultFiles, libraries);

    doProduceOutput(logger, artifacts, linkerContext, module, precompileOptions.shouldSaveSource(),
View Full Code Here

TOP

Related Classes of com.google.gwt.core.ext.linker.impl.StandardLinkerContext

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.