Example usage for com.google.gwt.dev.cfg BindingProperty setAllowedValues

List of usage examples for com.google.gwt.dev.cfg BindingProperty setAllowedValues

Introduction

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

Prototype

public void setAllowedValues(Condition condition, String... values) 

Source Link

Document

Set the currently allowed values.

Usage

From source file:com.google.gdt.eclipse.designer.hosted.tdz.HostedModeSupport.java

License:Open Source License

/**
 * Forcibly set 'user.agent' property to current platform.
 * http://fogbugz.instantiations.com/fogbugz/default.php?41513
 *//* ww w .j ava2  s. c  o m*/
private void fixUserAgentProperty(ModuleDef module) {
    Properties properties = module.getProperties();
    for (Property property : properties) {
        if ("user.agent".equals(property.getName())) {
            BindingProperty bindingProperty = (BindingProperty) property;
            bindingProperty.setAllowedValues(bindingProperty.getRootCondition(),
                    m_browserShell.getUserAgentString());
            return;
        }
    }
}