Sigh, Rietveld has indigestion and can't send you my comments. I'll
transcribe them here:
Please extend DOMTest to cover the new method.
While you're messing with UiBinderUtil.java, could you create
...uibinder.client.impl and move it there?
Instead of making each ElementParser aware of the cursor, could
HtmlInterpreter itself be responsible for creating the DomCursor and
ending the dom section? If you change it to implement
XMLElement.PostProcessingInterpreter<T> it gets a chance to do one-off
stuff at
the end, so endDomSection could happen in
XMLElement.PostProcessingInterpreter.postProcess(String)
Your call, maybe it would be too magical, too hard for the next
ElementParser
author to figure out.
A nit in WidgetPlaceholderInterpreter: elementToWidgeElement should be
named elementHolderToWidgeElement. Also, the for loop in postProcess
would be more efficient this way:
for (Map.Entry<String, XMLElement> entry :
elementToWidgetElement.entrySet()) {
String element = entry.getKey();
XMLElement childElem = entry.getValue();
// etc.
}
From the equals method in DomCursor.PathComponent: It's legal to compare
objects not of the same class. Should do an instanceof check before the
cast, or getClass() != obj.getClass() (latter if its final).
Yes, yes, I know, private class, but landmines and all that.
Later in DomCursor, you use methods from Arrays. I'm afraid GWT code
can't rely on anything in c.g.common yet.
From DomCursor#getAccessExpression: Here and on the overload below,
could you document why/when it's okay for
localVar and tag to be null? For that matter, if you've bothered with
the "I'll
null tag for you" overload, perhaps you can also provide a no args
overload as
well? Or wouldn't that be used?
In DomCursor#getAccessExpression and more so #getLookupMethod, please
don't bother with the "else" after and if (blah) { ... return }. Pet
peeve. getLookupMethod in particular would be more readable w/o all that
nesting.
In UiBinderWriter, might as well go ahead and always write out those
comments, I think. They're handy, and It's not like they'll ever reach
the browser.
http://gwt-code-reviews.appspot.com/241801/show
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
To unsubscribe from this group, send email to
google-web-toolkit-contributors+unsubscribegooglegroups.com or reply to this email with
the words "REMOVE ME" as the subject.