Reviewers: Ray Ryan,
Message:
This patch allows ui.xml files to refer to static fields.
Single fields:
<ui:import
field='com.google.gwt.uibinder.test.client.Constants.CONST_FOO'>
Wildcard (like import static Inner.*):
<ui:import
field='com.google.gwt.uibinder.test.client.Constants.Inner.*'>
Enum values (also works as a single field):
<ui:import
field='com.google.gwt.uibinder.test.client.Constants.MyEnum.*'>
Setting an element's attribute to the name of an enum value:
<p enumAttribute='{ENUM_VALUE.name}' />
Description:
Add <ui:import> to UiBinder to allow access to static fields.
Patch by: bobv
Review by: rjrjr
Suggested by: sonnyf
Please review this at http://gwt-code-reviews.appspot.com/781801/show
Affected files:
M user/src/com/google/gwt/uibinder/rebind/UiBinderParser.java
M user/src/com/google/gwt/uibinder/rebind/model/OwnerClass.java
A user/test/com/google/gwt/uibinder/test/client/Constants.java
M user/test/com/google/gwt/uibinder/test/client/UiBinderTest.java
M user/test/com/google/gwt/uibinder/test/client/WidgetBasedUi.ui.xml
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors