http://gwt-code-reviews.appspot.com/1624803/diff/1/user/src/com/google/gwt/user/client/ui/aria/AttributeValueType.java
File user/src/com/google/gwt/user/client/ui/aria/AttributeValueType.java
(right):

http://gwt-code-reviews.appspot.com/1624803/diff/1/user/src/com/google/gwt/user/client/ui/aria/AttributeValueType.java#newcode67
user/src/com/google/gwt/user/client/ui/aria/AttributeValueType.java:67:
+ value.getClass().getName();
Try compiling with and without this line and see if it makes a
significant difference.  Or ask one of the GWT compiler guys (I'm not
sure who though).

http://gwt-code-reviews.appspot.com/1624803/diff/1/user/src/com/google/gwt/user/client/ui/aria/Roles.java
File user/src/com/google/gwt/user/client/ui/aria/Roles.java (right):

http://gwt-code-reviews.appspot.com/1624803/diff/1/user/src/com/google/gwt/user/client/ui/aria/Roles.java#newcode61
user/src/com/google/gwt/user/client/ui/aria/Roles.java:61: public final
class Roles {
The benefit of using interfaces is that each interface has
getters/setters only for the properties/states that it supports, so
there aren't any runtime checks.  Instead of calling
Roles.BUTTON.setProperty(ACTIVE_DESC, "my desc") and possible throwing a
Runtime exception if the property isn't supported, you would call
ButtonRole.setActiveDesc(...).

The interfaces would mirror the hierarchy or roles.  Then, you can
generate Impls for the concrete Roles and factory methods to access
them.  It would look like this:
Roles.getButtonRole().setActiveDesc("my description");

That would mean some overlap in the impls because "setActiveDesc" might
be present in more than one concrete Role. But if you generate the code
from the interfaces, it wouldn't matter.


In its current state, this Roles file is very complicated and we can
easily introduce a bug if we try to edit it manually. It would be best
if we could generate a set of interfaces so that when new ARIA features
are added, we could just regenerate them.  Or at least we could generate
the code using a GWT generate that builds the concrete classes from the
interfaces.

http://gwt-code-reviews.appspot.com/1624803/diff/6001/user/src/com/google/gwt/aria/Role.java
File user/src/com/google/gwt/aria/Role.java (right):

http://gwt-code-reviews.appspot.com/1624803/diff/6001/user/src/com/google/gwt/aria/Role.java#newcode53
user/src/com/google/gwt/aria/Role.java:53: * @param parentRoles Parent
roles. One role can inherit from one or more patent roles
/more patent roles/more parent roles

http://gwt-code-reviews.appspot.com/1624803/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to