Package com.google.gwt.dev.cfg

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


      binding.setValues(binding.getRootCondition(), newValue);
    }
  }

  private static boolean maybeOverrideConfig(ModuleDef module, String propName, String newValue) {
    ConfigurationProperty config = module.getProperties().findConfigProp(propName);
    if (config != null) {
      config.setValue(newValue);
      return true;
    }
    return false;
  }
View Full Code Here


    // LogConfiguration needs to be earlier otherwise it will override UncaughtExceptionHandler.
    moduleDef.addEntryPointTypeName(LogConfiguration.class.getName());
    moduleDef.addEntryPointTypeName(GWTRunner.class.getName());

    // Squirrel away the name of the active module for GWTRunnerGenerator
    ConfigurationProperty moduleNameProp = moduleDef.getProperties().createConfiguration(
        "junit.moduleName", false);
    moduleNameProp.setValue(syntheticModuleName);

    strategy.processModule(moduleDef);

    junitShell.maybeCompileForWebMode(moduleDef, JUnitShell.getRemoteUserAgents());
View Full Code Here

    userAgentProperty.addTargetLibraryDefinedValue(userAgentProperty.getRootCondition(), "webkit");
    BindingProperty flavorProperty = properties.createBinding("flavor");
    flavorProperty.setProvider(new PropertyProvider("return window.properties.flavor;"));
    flavorProperty.addTargetLibraryDefinedValue(flavorProperty.getRootCondition(), "Vanilla");
    flavorProperty.addTargetLibraryDefinedValue(flavorProperty.getRootCondition(), "Chocolate");
    ConfigurationProperty emulateStackProperty =
        properties.createConfiguration("emulateStack", false);
    emulateStackProperty.setValue("TRUE");
    compiler.jprogram = new JProgram(new MinimalRebuildCache());

    // Builds property provider classes and a property provider registrator to register them.
    precompiler.buildPropertyProviderRegistrator(allRootTypes,
        Sets.newTreeSet(Lists.newArrayList(userAgentProperty, flavorProperty)),
View Full Code Here

              moduleName, strategy.getModuleInherit()}, true);
      // Replace any user entry points with our test runner.
      currentModule.clearEntryPoints();
      currentModule.addEntryPointTypeName(GWTRunner.class.getName());
      // Squirrel away the name of the active module for GWTRunnerGenerator
      ConfigurationProperty moduleNameProp = currentModule.getProperties().createConfiguration(
          "junit.moduleName");
      moduleNameProp.setValue(moduleName);
      runStyle.maybeCompileModule(syntheticModuleName);
    }

    JUnitFatalLaunchException launchException = checkTestClassInCurrentModule(
        getTopLogger(), currentModule, moduleName, testCase);
View Full Code Here

  @Override
  public com.google.gwt.core.ext.ConfigurationProperty getConfigurationProperty(
      String propertyName) throws BadPropertyValueException {
    Property prop = getProperty(propertyName);
    if (prop instanceof ConfigurationProperty) {
      final ConfigurationProperty cprop = (ConfigurationProperty) prop;
      final String name = cprop.getName();
      final List<String> values = cprop.getValues();
      return new DefaultConfigurationProperty(name, values);
    } else {
      throw new BadPropertyValueException(propertyName);
    }
  }
View Full Code Here

    List<PropertyPermutations> collapsedPermutations = allPermutations.collapseProperties();
    return collapsedPermutations;
  }

  static AbstractCompiler getCompiler(ModuleDef module) {
    ConfigurationProperty compilerClassProp =
        module.getProperties().createConfiguration("x.compiler.class", false);
    String compilerClassName = compilerClassProp.getValue();
    if (compilerClassName == null || compilerClassName.length() == 0) {
      return new JavaScriptCompiler();
    }
    Throwable caught;
    try {
View Full Code Here

    List<PropertyPermutations> collapsedPermutations = allPermutations.collapseProperties();
    return collapsedPermutations;
  }

  static AbstractCompiler getCompiler(ModuleDef module) {
    ConfigurationProperty compilerClassProp =
        module.getProperties().createConfiguration("x.compiler.class", false);
    String compilerClassName = compilerClassProp.getValue();
    if (compilerClassName == null || compilerClassName.length() == 0) {
      return new JavaScriptCompiler();
    }
    Throwable caught;
    try {
View Full Code Here

        CompilerEventType.CODE_SPLITTER, "phase", "pickInitialLoadSequence");
    TreeLogger branch = logger.branch(TreeLogger.TRACE,
        "Looking up initial load sequence for split points");
    LinkedHashSet<Integer> initialLoadSequence = new LinkedHashSet<Integer>();

    ConfigurationProperty prop;
    {
      Property p = properties.find(PROP_INITIAL_SEQUENCE);
      if (p == null) {
        throw new InternalCompilerException(
            "Could not find configuration property " + PROP_INITIAL_SEQUENCE);
      }
      if (!(p instanceof ConfigurationProperty)) {
        throw new InternalCompilerException(PROP_INITIAL_SEQUENCE
            + " is not a configuration property");
      }
      prop = (ConfigurationProperty) p;
    }

    for (String refString : prop.getValues()) {
      int splitPoint = findSplitPoint(refString, program, branch);
      if (initialLoadSequence.contains(splitPoint)) {
        branch.log(TreeLogger.ERROR, "Split point specified more than once: "
            + refString);
      }
View Full Code Here

      Memory.maybeDumpMemory("AstOnly");
      AstDumper.maybeDumpAST(jprogram);

      // See if we should run the EnumNameObfuscator
      if (module != null) {
        ConfigurationProperty enumNameObfuscationProp = (ConfigurationProperty) module.getProperties().find(
            ENUM_NAME_OBFUSCATION_PROPERTY);
        if (enumNameObfuscationProp != null
            && Boolean.parseBoolean(enumNameObfuscationProp.getValue())) {
          EnumNameObfuscator.exec(jprogram, logger);
        }
      }

      // (3) Perform Java AST normalizations.
View Full Code Here

    // Replace any user entry points with our test runner.
    moduleDef.clearEntryPoints();
    moduleDef.addEntryPointTypeName(GWTRunner.class.getName());

    // Squirrel away the name of the active module for GWTRunnerGenerator
    ConfigurationProperty moduleNameProp = moduleDef.getProperties().createConfiguration(
        "junit.moduleName", false);
    moduleNameProp.setValue(syntheticModuleName);

    runStyle.maybeCompileModule(syntheticModuleName);

    return moduleDef;
  }
View Full Code Here

TOP

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

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.