Package com.google.gwt.dev.cfg

Examples of com.google.gwt.dev.cfg.ConfigProps


      String[] allowedValues = bindingProperty.getAllowedValues(bindingProperty.getRootCondition());
      bindingProperty.setRootGeneratedValues(allowedValues);
    }

    // A snapshot of the module's configuration before we modified it.
    ConfigProps config = new ConfigProps(moduleDef);

    // We need a cross-site linker. Automatically replace the default linker.
    if (IFrameLinker.class.isAssignableFrom(moduleDef.getActivePrimaryLinker())) {
      moduleDef.addLinker("xsiframe");
    }

    // Check that we have a compatible linker.
    Class<? extends Linker> linker = moduleDef.getActivePrimaryLinker();
    if (!CrossSiteIframeLinker.class.isAssignableFrom(linker)) {
      logger.log(TreeLogger.ERROR,
          "linkers other than CrossSiteIFrameLinker aren't supported. Found: " + linker.getName());
      throw new UnableToCompleteException();
    }

    // Deactivate precompress linker.
    if (moduleDef.deactivateLinker("precompress")) {
      logger.log(TreeLogger.WARN, "Deactivated PrecompressLinker");
    }

    // Print a nice error if the superdevmode hook isn't present
    if (config.getStrings("devModeRedirectEnabled").isEmpty()) {
      throw new RuntimeException("devModeRedirectEnabled isn't set for module: " +
          moduleDef.getName());
    }

    // Disable the redirect hook here to make sure we don't have an infinite loop.
    // (There is another check in the JavaScript, but just in case.)
    overrideConfig(moduleDef, "devModeRedirectEnabled", "false");

    // Turn off "installCode" if it's on because it makes debugging harder.
    // (If it's already off, don't change anything.)
    if (config.getBoolean("installCode", true)) {
      overrideConfig(moduleDef, "installCode", "false");
      // Make sure installScriptJs is set to the default for compiling without installCode.
      overrideConfig(moduleDef, "installScriptJs",
          "com/google/gwt/core/ext/linker/impl/installScriptDirect.js");
    }
View Full Code Here


    CompilerContext compilerContext = provideCompilerContext();
    CompilationState state =
        CompilationStateBuilder.buildFrom(logger, compilerContext,
            sourceOracle.getResources(), getAdditionalTypeProviderDelegate());
    ConfigProps config = new ConfigProps(Lists.newArrayList(configProps));

    jProgram =
        JavaAstConstructor.construct(logger, state, compilerContext.getOptions(), config,
            "test.EntryPoint", "com.google.gwt.lang.Exceptions");
    jProgram.addEntryMethod(findMethod(jProgram, "onModuleLoad"));
View Full Code Here

    options.setOutput(JsOutputOption.PRETTY);
    options.setRunAsyncEnabled(false);
    CompilerContext context = new CompilerContext.Builder().options(options)
        .minimalRebuildCache(new MinimalRebuildCache()).build();

    ConfigProps config = new ConfigProps(Arrays.asList(recordFileNamesProp,
        recordLineNumbersProp));

    CompilationState state =
        CompilationStateBuilder.buildFrom(logger, context,
            sourceOracle.getResources(), null);
View Full Code Here

  }

  private String rename(JsProgram program, JsOutputOption outputOption, boolean persistent)
      throws IllegalNameException {
    JsSymbolResolver.exec(program);
    ConfigProps config = props.makeConfig();
    switch (outputOption) {
      case PRETTY:
        if (persistent) {
          JsPersistentPrettyNamer.exec(program, config, persistentPrettyNamerState);
        } else {
View Full Code Here

        props.put(ReservedNames.BLACKLIST, blacklist);
      }
      if (blacklistSuffixes != null) {
        props.put(ReservedNames.BLACKLIST_SUFFIXES, blacklistSuffixes);
      }
      return new ConfigProps(props);
    }
View Full Code Here

        } else {
          AssertionRemover.exec(jprogram);
        }
        if (module != null && options.isRunAsyncEnabled()) {
          ReplaceRunAsyncs.exec(logger, jprogram);
          ConfigProps config = new ConfigProps(module);
          CodeSplitters.pickInitialLoadSequence(logger, jprogram, config);
        }
        ImplementClassLiteralsAsFields.exec(jprogram);

        // (5) Optimize the unresolved Java AST
View Full Code Here

    }

    private void obfuscateEnums() {
      // See if we should run the EnumNameObfuscator
      if (module != null) {
        ConfigProps config = new ConfigProps(module);
        List<String> enumObfProps = config.getStrings(ENUM_NAME_OBFUSCATION_PROPERTY);
        String enumObfProp = enumObfProps != null ? enumObfProps.get(0) : null;
        if (!"false".equals(enumObfProp)) {
          EnumNameObfuscator.exec(jprogram, logger,
              config.getCommaSeparatedStrings(
                  ENUM_NAME_OBFUSCATION_BLACKLIST_PROPERTY),
              "closure".equals(enumObfProp));
        }
      }
    }
View Full Code Here

    permutations = new Permutation[perms.size()];
    rebindOracles = new RebindOracle[perms.size()];
    generatorContext = new StandardGeneratorContext(
        compilerContext, compilationState, generatorArtifacts, true);
    BindingProperty[] orderedProps = perms.getOrderedProperties();
    ConfigProps config = new ConfigProps(module);
    Rules rules = module.getRules();
    for (int i = 0; i < rebindOracles.length; ++i) {
      BindingProps props = new BindingProps(orderedProps, perms.getOrderedPropertyValues(i), config);
      rebindOracles[i] = new StandardRebindOracle(props.toPropertyOracle(), rules,
          generatorContext);
View Full Code Here

TOP

Related Classes of com.google.gwt.dev.cfg.ConfigProps

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.