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

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


    String moduleName = moduleNames.get(0);
    File compilerWorkDir = options.getCompilerWorkDir(moduleName);

    ModuleDef module = ModuleDefLoader.loadFromClassPath(logger, compilerContext, moduleName);
    compilerContext = compilerContextBuilder.module(module).build();
    StandardLinkerContext linkerContext = new StandardLinkerContext(
        TreeLogger.NULL, module, compilerContext.getPublicResourceOracle(), options);

    if (!linkerContext.allLinkersAreShardable()) {
      logger.log(TreeLogger.ERROR,
          "This compilation mode requires all linkers to be shardable.");
      return false;
    }
View Full Code Here


    properties = module.getProperties();
    perms = new PropertyPermutations(properties);
    WebModeCompilerFrontEnd frontEnd = new WebModeCompilerFrontEnd(compilationState, rebindPermOracle);
    jjs = new JavaToJavaScriptCompiler(logger, frontEnd, declEntryPts, jjsOptions);

    StandardLinkerContext linkerContext = new StandardLinkerContext(logger, module, outDir, generatorResourcesDir, jjsOptions);
    compilePermutations(logger, linkerContext, generatorArtifacts);

    if (jjsOptions.isValidateOnly()) {
      logger.log(TreeLogger.INFO, "Validation succeeded", null);
      return;
    }

    logger.log(TreeLogger.INFO, "Compilation succeeded", null);
    linkerContext.addOrReplaceArtifacts(generatorArtifacts);
    linkerContext.link(logger, linkerContext, null);
  }
View Full Code Here

    }
    if (developmentMode) {
      // BACKWARDS COMPATIBILITY: many linkers currently fail in dev mode.
      try {
        Linker l = module.getActivePrimaryLinker().newInstance();
        StandardLinkerContext context =
          new StandardLinkerContext(getTopLogger(), module, null);
        if (!l.supportsDevModeInJunit(context)) {
          if (module.getLinker("std") != null) {
            // TODO: unfortunately, this could be race condition between dev/prod
            module.addLinker("std");
          }
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, options);
    linkerStacks.put(module.getName(), linkerStack);

    ArtifactSet artifacts = linkerStack.invokeLink(linkLogger);
    produceOutput(linkLogger, linkerStack, artifacts, module);
  }
View Full Code Here

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

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

    ArtifactSet artifacts = linkerStack.invokeRelink(linkLogger,
        newlyGeneratedArtifacts);
    produceOutput(linkLogger, linkerStack, artifacts, module);
  }
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

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.