Reviewers: bruce, scottb, Lex, Message: Review requested.
Description: This patch allows <set-property> and <extend-property> to be subjected to conditions based on deferred-binding property values. The net effect allows the developer to use a richer number of deferred-binding properties without necessarily causing an explosion in the number of permutations. Note that this doesn't rely on the existing rebind-answer reduction, it changes the permutation code to produce only a subset of the total permutation matrix. Instead of [prop1] * [prop2] * [prop3] * [prop4], some of the multiplication can be replaced with addition by examining the implicit dependencies created between property values. The bulk of the change is: - Change ModuleDefSchema to break the current ConditionSchema into a property-only schema and the "full" condition schema. - Add additional metadata to Condition types and make it easier to call isTrue() - Change PropertyPermutations to evaluate conditions as part of performing the permutation - Remove Properties.numPermutations() since you'd have to evaluate the conditions to know the number of permutations This patch does not allow conditional <define-property> tags, but this wouldn't be too hard to add if there's a real use case for it. See http://gwt-code-reviews.appspot.com/57803 for a sample application that conditionally enables a deferred-bound feature. Please review this at http://gwt-code-reviews.appspot.com/57802 Affected files: M dev/core/src/com/google/gwt/core/ext/linker/impl/StandardSelectionProperty.java M dev/core/src/com/google/gwt/dev/Precompile.java M dev/core/src/com/google/gwt/dev/cfg/BindingProperty.java M dev/core/src/com/google/gwt/dev/cfg/CompoundCondition.java M dev/core/src/com/google/gwt/dev/cfg/Condition.java M dev/core/src/com/google/gwt/dev/cfg/ConditionAll.java M dev/core/src/com/google/gwt/dev/cfg/ConditionAny.java M dev/core/src/com/google/gwt/dev/cfg/ConditionNone.java M dev/core/src/com/google/gwt/dev/cfg/ConditionWhenPropertyIs.java M dev/core/src/com/google/gwt/dev/cfg/ConditionWhenTypeAssignableTo.java M dev/core/src/com/google/gwt/dev/cfg/ConditionWhenTypeIs.java M dev/core/src/com/google/gwt/dev/cfg/Conditions.java M dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java M dev/core/src/com/google/gwt/dev/cfg/ModuleDefSchema.java M dev/core/src/com/google/gwt/dev/cfg/Properties.java M dev/core/src/com/google/gwt/dev/cfg/Property.java M dev/core/src/com/google/gwt/dev/cfg/PropertyPermutations.java M dev/core/src/com/google/gwt/dev/cfg/Rule.java M dev/core/src/com/google/gwt/dev/shell/ModuleSpacePropertyOracle.java M dev/core/test/com/google/gwt/dev/util/test/PropertyPermutationsTest.java M user/src/com/google/gwt/junit/JUnitShell.java M user/test/com/google/gwt/dev/cfg/PropertyTest.gwt.xml M user/test/com/google/gwt/dev/cfg/PropertyTest.java --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
