Package com.google.gwt.dev.cfg

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


        RuntimeRebindRuleGenerator.RUNTIME_REBIND_RULE_SOURCES_BY_SHORT_NAME;
    Rules rules = new Rules();
    RuleFail ruleFail = new RuleFail();
    ruleFail.getRootCondition().getConditions().add(new ConditionWhenPropertyIs("foo", "bar"));
    rules.prepend(ruleFail);
    rules.prepend(new RuleGenerateWith(Generator.class));
    RuleReplaceWith ruleReplaceCanvas = new RuleReplaceWith("WebkitCanvasElement");
    ruleReplaceCanvas.getRootCondition()
        .getConditions().add(new ConditionWhenTypeIs("CanvasElement"));
    rules.prepend(ruleReplaceCanvas);
    rules.prepend(new RuleReplaceWithFallback("CanvasElement"));
View Full Code Here


    userAgentProperty.addDefinedValue(userAgentProperty.getRootCondition(), "webkit_tablet");
    BindingProperty flavorProperty = module.getProperties().createBinding("locale");
    flavorProperty.addDefinedValue(flavorProperty.getRootCondition(), "en");
    flavorProperty.addDefinedValue(flavorProperty.getRootCondition(), "fr");
    flavorProperty.addDefinedValue(flavorProperty.getRootCondition(), "ru");
    RuleGenerateWith browserShimGenerateRule = new RuleGenerateWith(BrowserShimGenerator.class);
    browserShimGenerateRule.getRootCondition()
        .getConditions().add(new ConditionWhenTypeEndsWith("Shim"));
    module.addRule(browserShimGenerateRule);
    RuleGenerateWith localeMessageGenerateRule = new RuleGenerateWith(LocaleMessageGenerator.class);
    localeMessageGenerateRule.getRootCondition()
        .getConditions().add(new ConditionWhenTypeEndsWith("Messages"));
    module.addRule(localeMessageGenerateRule);
    LibraryGroup libraryGroup = LibraryGroupTest.buildVariedPropertyGeneratorLibraryGroup(
        Sets.newHashSet("com.google.ChromeMessages"),
        Sets.newHashSet("com.google.WindowShim"));
View Full Code Here

      Set<Rule> generatorRules = Sets.newHashSet(module.getGeneratorRules());

      TreeLogger branch = logger.branch(TreeLogger.SPAM, "running generators");

      for (Rule rule : generatorRules) {
        RuleGenerateWith generatorRule = (RuleGenerateWith) rule;
        String generatorName = generatorRule.getName();

        if (generatorRule.contentDependsOnTypes() && !globalCompile) {
          // Type unstable generators can only be safely run in the global phase.
          // TODO(stalcup): modify type unstable generators such that their output is no longer
          // unstable.
          branch.log(TreeLogger.SPAM,
              "skipping generator " + generatorName + " since it can only run in the global phase");
          continue;
        }

        if (!generatorRule.relevantPropertiesAreFinal(module.getProperties(),
            options.getFinalProperties())) {
          // Some property(s) that this generator cares about have not yet reached their final
          // value. Running the generator now would be wasted effort as it would just need to be run
          // again later anyway.
          branch.log(TreeLogger.SPAM, "skipping generator " + generatorName
View Full Code Here

      Set<Rule> generatorRules = Sets.newHashSet(module.getGeneratorRules());

      TreeLogger branch = logger.branch(TreeLogger.SPAM, "running generators");

      for (Rule rule : generatorRules) {
        RuleGenerateWith generatorRule = (RuleGenerateWith) rule;
        String generatorName = generatorRule.getName();

        if (generatorRule.contentDependsOnTypes() && !globalCompile) {
          // Type unstable generators can only be safely run in the global phase.
          // TODO(stalcup): modify type unstable generators such that their output is no longer
          // unstable.
          branch.log(TreeLogger.SPAM,
              "skipping generator " + generatorName + " since it can only run in the global phase");
          continue;
        }

        if (!generatorRule.relevantPropertiesAreFinal(module.getProperties(),
            options.getFinalProperties())) {
          // Some property(s) that this generator cares about have not yet reached their final
          // value. Running the generator now would be wasted effort as it would just need to be run
          // again later anyway.
          branch.log(TreeLogger.SPAM, "skipping generator " + generatorName
View Full Code Here

TOP

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

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.