Example usage for com.google.gwt.dev.cfg StaticPropertyOracle StaticPropertyOracle

List of usage examples for com.google.gwt.dev.cfg StaticPropertyOracle StaticPropertyOracle

Introduction

In this page you can find the example usage for com.google.gwt.dev.cfg StaticPropertyOracle StaticPropertyOracle.

Prototype

public StaticPropertyOracle(BindingProperty[] orderedProps, String[] orderedPropValues,
        ConfigurationProperty[] configProps) 

Source Link

Document

Create a property oracle that will return the supplied values.

Usage

From source file:com.googlecode.gwt.test.internal.handlers.GeneratorCreateHandler.java

License:Apache License

protected PropertyOracle getPropertyOracle() {
    if (propertyOracle == null) {
        PropertyPermutations permutations = new PropertyPermutations(moduleDef.getProperties(),
                moduleDef.getActiveLinkerNames());

        SortedSet<ConfigurationProperty> configPropSet = moduleDef.getProperties().getConfigurationProperties();
        ConfigurationProperty[] configProps = configPropSet
                .toArray(new ConfigurationProperty[configPropSet.size()]);

        BindingProperty[] orderedProperties = permutations.getOrderedProperties();

        WithProperties withProperties = GwtTestDataHolder.get().getCurrentWithProperties();

        String[] processedProperties;
        if (withProperties != null) {
            processedProperties = replaceOrderedPropertyValues(orderedProperties,
                    permutations.getOrderedPropertyValues(0), withProperties);
        } else {//  www.  ja  v a2s . c  om
            processedProperties = permutations.getOrderedPropertyValues(0);
        }

        propertyOracle = new StaticPropertyOracle(orderedProperties, processedProperties, configProps);
    }

    return propertyOracle;
}