Nice! Nearly there.
http://gwt-code-reviews.appspot.com/1149803/diff/40001/41002 File user/src/com/google/gwt/uibinder/elementparsers/DialogBoxParser.java (left): http://gwt-code-reviews.appspot.com/1149803/diff/40001/41002#oldcode72 user/src/com/google/gwt/uibinder/elementparsers/DialogBoxParser.java:72: DialogBox.class.getCanonicalName())); If ResizeDialogBox extends DialogBox, you won't need a separate parser for it. This one will fire for both. In fact, I think subclassing the parser would lead to trouble for you. On 2011/01/19 19:49:38, Jeff Larsen wrote:
I made this a method because I'm working on ResizeDialogBox and with
this as a
protected method, I'll be able to reuse the handleConstructorArgs.
http://gwt-code-reviews.appspot.com/1149803/diff/40001/41002 File user/src/com/google/gwt/uibinder/elementparsers/DialogBoxParser.java (right): http://gwt-code-reviews.appspot.com/1149803/diff/40001/41002#newcode47 user/src/com/google/gwt/uibinder/elementparsers/DialogBoxParser.java:47: } else if ("captionWidget".equals(child.getLocalName())) { Should be "customCaption" http://gwt-code-reviews.appspot.com/1149803/diff/40001/41002#newcode52 user/src/com/google/gwt/uibinder/elementparsers/DialogBoxParser.java:52: captionWidget = child.consumeSingleChildElement(); Need to be stricter. Shouldn't allow both caption and customCaption. See TabLayoutPanelParser for example. http://gwt-code-reviews.appspot.com/1149803/diff/40001/41002#newcode80 user/src/com/google/gwt/uibinder/elementparsers/DialogBoxParser.java:80: protected String getPackage(XMLElement element) { UiBinderWriter.findFieldType(XMLElement) On 2011/01/19 19:49:38, Jeff Larsen wrote:
There has to be a cleaner way of doing this... I just couldn't find
the right
method call.
http://gwt-code-reviews.appspot.com/1149803/diff/40001/41001 File user/src/com/google/gwt/user/client/ui/DialogBox.java (right): http://gwt-code-reviews.appspot.com/1149803/diff/40001/41001#newcode95 user/src/com/google/gwt/user/client/ui/DialogBox.java:95: * You may also create your own header caption. The caption must extend {@Link s/extend/implement/, and it's {@link Caption} http://gwt-code-reviews.appspot.com/1149803/diff/40001/41001#newcode96 user/src/com/google/gwt/user/client/ui/DialogBox.java:96: * DialogBox.Caption}. This will provides you with the ability to add The last sentence isn't really needed. http://gwt-code-reviews.appspot.com/1149803/diff/40001/41001#newcode106 user/src/com/google/gwt/user/client/ui/DialogBox.java:106: * <g:captionWidget><foo:Bar/></g:captionWidget> I think we typically call elements like this g:customCaption Also, wouldn't it be an error to provide both g:caption and g:customCaption? http://gwt-code-reviews.appspot.com/1149803/diff/40001/41001#newcode115 user/src/com/google/gwt/user/client/ui/DialogBox.java:115: * You may also create your own header caption. The caption must extend {@Link Redundant, though it's better here http://gwt-code-reviews.appspot.com/1149803/diff/40001/41001#newcode117 user/src/com/google/gwt/user/client/ui/DialogBox.java:117: * follows: ahem http://gwt-code-reviews.appspot.com/1149803/diff/40001/41001#newcode203 user/src/com/google/gwt/user/client/ui/DialogBox.java:203: * Creates an empty dialog box specifying its {@link Caption}. auto-hide is Creates an empty dialog box with a custom {@link Caption}. No need for the "auto-hide is set to false and" phrase, should be consistent with the verbiage on the default constructor http://gwt-code-reviews.appspot.com/1149803/diff/40001/41001#newcode230 user/src/com/google/gwt/user/client/ui/DialogBox.java:230: * implementation of the {@link Caption}. It should not be shown until its "and a custom {@link Caption}." http://gwt-code-reviews.appspot.com/1149803/diff/40001/41003 File user/test/com/google/gwt/user/client/ui/DialogBoxTest.java (right): http://gwt-code-reviews.appspot.com/1149803/diff/40001/41003#newcode141 user/test/com/google/gwt/user/client/ui/DialogBoxTest.java:141: assertEquals("text", dialogBox.getHTML().toLowerCase()); Why was this change needed? http://gwt-code-reviews.appspot.com/1149803/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors