Nearly there.

Do you need me to take this over?


http://gwt-code-reviews.appspot.com/103806/diff/2001/3002
File
user/src/com/google/gwt/uibinder/attributeparsers/AttributeParsers.java
(right):

http://gwt-code-reviews.appspot.com/103806/diff/2001/3002#newcode84
Line 84: addAttributeParser(UNIT, unitParser);
I don't think you should do this. It's redundant with the general enum
parsing mechanism.

http://gwt-code-reviews.appspot.com/103806/diff/2001/3003
File
user/src/com/google/gwt/uibinder/attributeparsers/LengthAttributeParser.java
(right):

http://gwt-code-reviews.appspot.com/103806/diff/2001/3003#newcode40
Line 40: "((?:\\{[\\w\\.]+\\})|[\\d\\.]+)\\s*(\\{?[\\w\\.\\%]*\\}?)?");
*boggle*

http://gwt-code-reviews.appspot.com/103806/diff/2001/3003#newcode80
Line 80: if (unitMap.containsKey(unitStr)) {
You could make this even simpler. Do the % case by hand, and for every
other value cast to upper case and hand off to the enum parser.

http://gwt-code-reviews.appspot.com/103806/diff/2001/3008
File
user/test/com/google/gwt/uibinder/attributeparsers/LengthAttributeParserTest.java
(right):

http://gwt-code-reviews.appspot.com/103806/diff/2001/3008#newcode94
Line 94: parser.parse("{foo.value}{foo.unit}"));
wow :-)

http://gwt-code-reviews.appspot.com/103806/diff/2001/3008#newcode136
Line 136: }
Should test bad field refs, in particular escaped ones:

{{foo.value}px and 1{{foo.unit}

http://gwt-code-reviews.appspot.com/103806/diff/2001/3009
File
user/test/com/google/gwt/uibinder/elementparsers/LayoutPanelParserTest.java
(right):

http://gwt-code-reviews.appspot.com/103806/diff/2001/3009#newcode142
Line 142: public void testLonelyBottom() throws SAXException,
IOException {
/me bites tongue. Ouch.

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

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

Reply via email to