Package com.google.gwt.dev.cfg

Examples of com.google.gwt.dev.cfg.Properties.createBinding()


  public void processModule(ModuleDef module) {
    computePropertiesMap();
    if (properties.size() > 0) {
      Properties props = module.getProperties();
      for (Property property : properties) {
        BindingProperty binding = props.createBinding(property.name());
        if (!binding.isDefinedValue(property.value())) {
          binding.addTargetLibraryDefinedValue(binding.getRootCondition(), property.value());
        }
        binding.setValues(
            binding.getRootCondition(), property.value());
View Full Code Here


      prop.addDefinedValue(prop.getRootCondition(), "ie8");
      prop.addDefinedValue(prop.getRootCondition(), "opera");
    }

    {
      BindingProperty prop = props.createBinding("stackTraces");
      prop.addDefinedValue(prop.getRootCondition(), "false");

      ConditionAny cond = new ConditionAny();
      cond.getConditions().add(new ConditionWhenPropertyIs("user.agent", "ie6"));
      cond.getConditions().add(new ConditionWhenPropertyIs("user.agent", "ie8"));
View Full Code Here

    // This is what you'd get with a conditional <set-property value="false">
    ModuleDef md = new ModuleDef("testTwoDimensionsWithRestriction");
    Properties props = md.getProperties();

    {
      BindingProperty prop = props.createBinding("user.agent");
      prop.addDefinedValue(prop.getRootCondition(), "moz");
      prop.addDefinedValue(prop.getRootCondition(), "ie6");
      prop.addDefinedValue(prop.getRootCondition(), "ie8");
      prop.addDefinedValue(prop.getRootCondition(), "opera");
    }
View Full Code Here

      prop.addDefinedValue(prop.getRootCondition(), "ie8");
      prop.addDefinedValue(prop.getRootCondition(), "opera");
    }

    {
      BindingProperty prop = props.createBinding("stackTraces");
      prop.addDefinedValue(prop.getRootCondition(), "false");
      prop.addDefinedValue(prop.getRootCondition(), "true");

      ConditionAny cond = new ConditionAny();
      cond.getConditions().add(new ConditionWhenPropertyIs("user.agent", "moz"));
View Full Code Here

    // This is what you'd get with a conditional <set-property value="false">
    ModuleDef md = new ModuleDef("testCycle");
    Properties props = md.getProperties();

    {
      BindingProperty prop = props.createBinding("A");
      prop.addDefinedValue(prop.getRootCondition(), "a1");
      prop.addDefinedValue(prop.getRootCondition(), "a2");

      prop.addDefinedValue(new ConditionWhenPropertyIs("B", "b3"), "a3");
    }
View Full Code Here

      prop.addDefinedValue(new ConditionWhenPropertyIs("B", "b3"), "a3");
    }

    {
      BindingProperty prop = props.createBinding("B");
      prop.addDefinedValue(prop.getRootCondition(), "b1");
      prop.addDefinedValue(prop.getRootCondition(), "b2");

      prop.addDefinedValue(new ConditionWhenPropertyIs("A", "a3"), "b3");
    }
View Full Code Here

  public void testOneDimensionPerm() {
    ModuleDef md = new ModuleDef("testOneDimensionPerm");
    Properties props = md.getProperties();

    {
      BindingProperty prop = props.createBinding("debug");
      prop.addDefinedValue(prop.getRootCondition(), "false");
      prop.addDefinedValue(prop.getRootCondition(), "true");
    }

    // Permutations and their values are in stable alphabetical order.
View Full Code Here

  public void testOneDimensionPermWithCollapse() {
    ModuleDef md = new ModuleDef("testOneDimensionPerm");
    Properties props = md.getProperties();

    {
      BindingProperty prop = props.createBinding("debug");
      prop.addDefinedValue(prop.getRootCondition(), "false");
      prop.addDefinedValue(prop.getRootCondition(), "true");
      prop.addCollapsedValues("true", "false");
    }
View Full Code Here

  public void testTwoDimensionPerm() {
    ModuleDef md = new ModuleDef("testTwoDimensionPerm");
    Properties props = md.getProperties();

    {
      BindingProperty prop = props.createBinding("user.agent");
      prop.addDefinedValue(prop.getRootCondition(), "moz");
      prop.addDefinedValue(prop.getRootCondition(), "ie6");
      prop.addDefinedValue(prop.getRootCondition(), "opera");
    }
View Full Code Here

      prop.addDefinedValue(prop.getRootCondition(), "ie6");
      prop.addDefinedValue(prop.getRootCondition(), "opera");
    }

    {
      BindingProperty prop = props.createBinding("debug");
      prop.addDefinedValue(prop.getRootCondition(), "false");
      prop.addDefinedValue(prop.getRootCondition(), "true");
    }

    // String[]s and their values are in stable alphabetical order.
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.