[gwt-contrib] gwt-incubator version compatible with GWT 2.1
Just curious when the gwt-incubator will become compatible with GWT 2.1? Cameron -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fix javadoc issues (issue681801)
LGTM On Fri, Jul 9, 2010 at 2:17 PM, r...@google.com wrote: Reviewers: Ray Ryan, Description: Fix javadoc issues Please review this at http://gwt-code-reviews.appspot.com/681801/show Affected files: M user/src/com/google/gwt/app/place/AbstractRecordListActivity.java M user/src/com/google/gwt/app/place/ActivityManager.java M user/src/com/google/gwt/app/place/RecordListView.java M user/src/com/google/gwt/cell/client/package.html M user/src/com/google/gwt/i18n/shared/BidiFormatter.java M user/src/com/google/gwt/i18n/shared/HasDirectionEstimator.java M user/src/com/google/gwt/requestfactory/shared/Id.java M user/src/com/google/gwt/requestfactory/shared/Version.java M user/src/com/google/gwt/uibinder/client/UiField.java M user/src/com/google/gwt/uibinder/client/package-info.java M user/src/com/google/gwt/user/client/ui/AnimatedLayout.java M user/src/com/google/gwt/user/client/ui/CustomButton.java M user/src/com/google/gwt/user/client/ui/LayoutCommand.java M user/src/com/google/gwt/user/client/ui/LayoutPanel.java M user/src/com/google/gwt/user/client/ui/UIObject.java M user/src/com/google/gwt/user/client/ui/ValueBoxBase.java M user/src/com/google/gwt/valuestore/client/DeltaValueStoreJsonImpl.java M user/src/com/google/gwt/valuestore/client/ValueStoreJsonImpl.java M user/src/com/google/gwt/valuestore/shared/DeltaValueStore.java M user/src/com/google/gwt/valuestore/shared/ValueStore.java M user/src/com/google/gwt/view/client/AbstractListViewAdapter.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add support for creating Grid elements using UiBinder. (issue154810)
Nice. Just some error checking nits left. http://gwt-code-reviews.appspot.com/154810/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add support for creating Grid elements using UiBinder. (issue154810)
http://gwt-code-reviews.appspot.com/154810/diff/63002/70001 File user/src/com/google/gwt/uibinder/elementparsers/GridParser.java (right): http://gwt-code-reviews.appspot.com/154810/diff/63002/70001#newcode86 user/src/com/google/gwt/uibinder/elementparsers/GridParser.java:86: writer.getOracle().findType(Grid.class.getName()), 0, 0); This line serves no purpose that I can see. http://gwt-code-reviews.appspot.com/154810/diff/63002/70001#newcode130 user/src/com/google/gwt/uibinder/elementparsers/GridParser.java:130: writer.die(Grid's lt;g:row tag in %s may only contain %s or %s element., No need for lt; here, and g: shouldn't be hard coded http://gwt-code-reviews.appspot.com/154810/diff/63002/70001#newcode149 user/src/com/google/gwt/uibinder/elementparsers/GridParser.java:149: throws UnableToCompleteException { You're not enforcing that the child elements have the same prefix as the parent. (Note that you should not hardcode g:, just make sure that they all have the same value for XmlElement#getPrefix.) http://gwt-code-reviews.appspot.com/154810/diff/63002/70001#newcode152 user/src/com/google/gwt/uibinder/elementparsers/GridParser.java:152: String tagName = child.getLocalName(); Compare prefix too http://gwt-code-reviews.appspot.com/154810/diff/63002/70001#newcode154 user/src/com/google/gwt/uibinder/elementparsers/GridParser.java:154: writer.die(Invalid Grid child element: + tagName); %1$s:Grid elements must contain only %1$s:%2$s children, found %3$s:%4$s, elem.getPrefix(), ROW_TAG, child.getPrefix(), tagName http://gwt-code-reviews.appspot.com/154810/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fix for issue 516 (issue612802)
http://gwt-code-reviews.appspot.com/612802/diff/28001/29001 File user/src/com/google/gwt/user/client/ui/RootPanel.java (right): http://gwt-code-reviews.appspot.com/612802/diff/28001/29001#newcode92 user/src/com/google/gwt/user/client/ui/RootPanel.java:92: } There is no need to copy Panel#clear here. Just call clear(); http://gwt-code-reviews.appspot.com/612802/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] UiBinder tweaks for GWT Designer
[Sorry for the spotty response time, it's vacation season.] Okay, that's pretty cute. And completely isolated from the patch I pointed you at, so don't worry about it. I'm open to this. My only reservation at this point is the question of how we'll ensure that it's only available at tool time. On Fri, Jul 2, 2010 at 3:39 PM, Konstantin Scheglov konstantin.scheg...@gmail.com wrote: On Fri, Jul 2, 2010 at 6:20 PM, Ray Ryan rj...@google.com wrote: This is absolutely not related to databinding, we just want to produce GUI builder for UiBinder. I think that tooling was specified as one of the reasons to use XML for GWT UI. So, this is on what I work now. :-) Well that makes a lot more sense. :-) It occurs to me that this could be a lot easier when we revive r7816http://code.google.com/p/google-web-toolkit/source/detail?r=7816, which I had to roll back (r7858http://code.google.com/p/google-web-toolkit/source/detail?spec=svn8346r=7858) due to its naive handling of tables. If we make the paths the binder builds part of its public api, you could have your map and we wouldn't have to think as hard about hiding design time hooks from developers, or at least not all of them. Certainly, you shouldn't make your changes before that code comes back (and it really, really needs to come back). Sorry, but I don't understand on what to look in r7816http://code.google.com/p/google-web-toolkit/source/detail?r=7816 . Can you give hint how this can help in accessing widget objects and attribute values? If you speak about paths like 0/1/0, then I already have implementation for preparing/remembering them in XMLElement. public class XMLElement { //XXX Instantiations private static final WeakHashMapElement, String wbpElementPaths = new WeakHashMapElement, String(); public static void rememberPathForElements(Document doc) { rememberPathForElements(doc.getDocumentElement(), 0); } private static void rememberPathForElements(Element element, String path) { wbpElementPaths.put(element, path); NodeList childNodes = element.getChildNodes(); int elementIndex = 0; for (int i = 0; i childNodes.getLength(); ++i) { Node childNode = childNodes.item(i); if (childNode.getNodeType() == Node.ELEMENT_NODE) { Element childElement = (Element) childNode; rememberPathForElements(childElement, path + / + elementIndex++); } } } public String getPath() { return wbpElementPaths.get(elem); } //XXX Instantiations This method is called from UiBinderGenerator.generateOnce() --- Document doc = getW3cDoc(logger, templatePath); //XXX Instantiations XMLElement.rememberPathForElements(doc); //XXX Instantiations uiBinderWriter.parseDocument(doc, binderPrintWriter); --- In your original note you suggested: In method createAndBindUi() directly after creating each Widget instance (but before applying setX() methods) wbpObjectHandler is used to notify GWT Designer about new widget and its path in XML. GWT Designer bind Widget instance to model (using path) and also asks default values for all properties using getX() methods. Why do you need this notice before the set calls? We need default values for properties. This allows us to remove attribute (or method invocation in case of Java version of GWTD) when user tries to set for property same value as default. Easiest example - flipping enabled between true/false. Default value is true, so only enabled=false is written into XML. But if enabled=false already existed in XML, and we ask isEnabled() after set calls, then it is false and we can not know that default value is true. So, we need ask isEnabled() before setEnabled(false), i.e. directly after widget creation. Of course situation is trivial for enabled and standard GWT widgets and we could hardcode its default value. But we can not expect anything about custom widgets - some of them may be will use enabled false by default, or introduce new properties for which we also need to know value. At same time we need not only default values, but also actual values for properties/attributes. Not all setX() properties have corresponding getX() method. So, only reliable way for GWT Designer to know value is patch UiBinder generator to remember these values into map. 4. To allow quick updates of design canvas as user changes properties, without reloading GWT context each time, we should: 4.1. Generate Binder implementation class with new name each time, so be able to define each time new class in same ClassLoader. Right now we just add current time to the name of class. //XXX Instantiations // generate class with new name each time, to allow refresh in same ClassLoader implName += _wbp +
[gwt-contrib] Re: Add support for creating Grid elements using UiBinder. (issue154810)
Did the changes... Will post the patch a little later... I need to convert it from git to svn format first... http://gwt-code-reviews.appspot.com/154810/diff/63002/70001 File user/src/com/google/gwt/uibinder/elementparsers/GridParser.java (right): http://gwt-code-reviews.appspot.com/154810/diff/63002/70001#newcode86 user/src/com/google/gwt/uibinder/elementparsers/GridParser.java:86: writer.getOracle().findType(Grid.class.getName()), 0, 0); You should be right about this http://gwt-code-reviews.appspot.com/154810/diff/63002/70001#newcode86 user/src/com/google/gwt/uibinder/elementparsers/GridParser.java:86: writer.getOracle().findType(Grid.class.getName()), 0, 0); On 2010/07/12 17:07:40, Ray Ryan wrote: This line serves no purpose that I can see. Done. http://gwt-code-reviews.appspot.com/154810/diff/63002/70001#newcode130 user/src/com/google/gwt/uibinder/elementparsers/GridParser.java:130: writer.die(Grid's lt;g:row tag in %s may only contain %s or %s element., On 2010/07/12 17:07:40, Ray Ryan wrote: No need for lt; here, and g: shouldn't be hard coded Done. http://gwt-code-reviews.appspot.com/154810/diff/63002/70001#newcode149 user/src/com/google/gwt/uibinder/elementparsers/GridParser.java:149: throws UnableToCompleteException { Done. Also made sure that cells have the same prefix as parent. http://gwt-code-reviews.appspot.com/154810/diff/63002/70001#newcode152 user/src/com/google/gwt/uibinder/elementparsers/GridParser.java:152: String tagName = child.getLocalName(); On 2010/07/12 17:07:40, Ray Ryan wrote: Compare prefix too Done. http://gwt-code-reviews.appspot.com/154810/diff/63002/70001#newcode154 user/src/com/google/gwt/uibinder/elementparsers/GridParser.java:154: writer.die(Invalid Grid child element: + tagName); On 2010/07/12 17:07:40, Ray Ryan wrote: %1$s:Grid elements must contain only %1$s:%2$s children, found %3$s:%4$s, elem.getPrefix(), ROW_TAG, child.getPrefix(), tagName Done. http://gwt-code-reviews.appspot.com/154810/diff/63002/70003 File user/src/com/google/gwt/user/client/ui/Grid.java (right): http://gwt-code-reviews.appspot.com/154810/diff/63002/70003#newcode35 user/src/com/google/gwt/user/client/ui/Grid.java:35: * Grid widget consists of lt;g:row elements. Each lt;g:row element On 2010/07/03 20:46:51, markovuksanovic wrote: One small typo - can contain on or more - should be - can contain one or more Done. http://gwt-code-reviews.appspot.com/154810/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Fix some bugs in symbol dumping. (issue685801)
Reviewers: fabbott, Description: Fix some bugs in symbol dumping. 1) Fixes an NPE when dumping symbols with -validateOnly. 2) Fixes unstable sort order being returned from TypeOracle.getTypes(). Review by: fabb...@google.com Please review this at http://gwt-code-reviews.appspot.com/685801/show Affected files: M dev/core/src/com/google/gwt/core/ext/typeinfo/TypeOracle.java M dev/core/src/com/google/gwt/dev/Precompile.java Index: dev/core/src/com/google/gwt/core/ext/typeinfo/TypeOracle.java === --- dev/core/src/com/google/gwt/core/ext/typeinfo/TypeOracle.java (revision 8376) +++ dev/core/src/com/google/gwt/core/ext/typeinfo/TypeOracle.java (working copy) @@ -584,7 +584,14 @@ */ public JClassType[] getTypes() { CollectionJRealClassType values = allTypes.values(); -return values.toArray(new JClassType[values.size()]); +JClassType[] result = values.toArray(new JClassType[values.size()]); +Arrays.sort(result, new ComparatorJClassType() { + public int compare(JClassType o1, JClassType o2) { +return o1.getQualifiedSourceName().compareTo( +o2.getQualifiedSourceName()); + } +}); +return result; } public JWildcardType getWildcardType(JWildcardType.BoundType boundType, @@ -617,7 +624,7 @@ * of the preceding. * p * Examples of types that can be parsed by this method. - * ul + * ulthird_party/java_src/gwt/svn/trunk/dev/core/src/com/google/gwt/core/ext/typeinfo/TypeOracle.java * licodeint/code/li * licodejava.lang.Object/code/li * licodejava.lang.String[]/code/li Index: dev/core/src/com/google/gwt/dev/Precompile.java === --- dev/core/src/com/google/gwt/dev/Precompile.java (revision 8376) +++ dev/core/src/com/google/gwt/dev/Precompile.java (working copy) @@ -472,11 +472,6 @@ module.getActiveLinkerNames()), genDir); // Allow GC later. compilationState = null; - if (dumpSignatureFile != null) { -// Dump early to avoid generated types. -SignatureDumper.dumpSignatures(logger, -compilationState.getTypeOracle(), dumpSignatureFile); - } // Never optimize on a validation run. jjsOptions.setOptimizePrecompile(false); getCompiler(module).precompile(logger, module, rpo, declEntryPts, -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fix some bugs in symbol dumping. (issue685801)
http://gwt-code-reviews.appspot.com/685801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fix some bugs in symbol dumping. (issue685801)
http://gwt-code-reviews.appspot.com/685801/diff/2002/3002 File dev/core/src/com/google/gwt/dev/Precompile.java (left): http://gwt-code-reviews.appspot.com/685801/diff/2002/3002#oldcode478 dev/core/src/com/google/gwt/dev/Precompile.java:478: compilationState.getTypeOracle(), dumpSignatureFile); This was causing an NPE due to line 475. But this whole section is a duplicate anyway, signatures are already dumped on line 453. Probably a bad merge sometime in the past. http://gwt-code-reviews.appspot.com/685801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fix some bugs in symbol dumping. (issue685801)
On Mon, Jul 12, 2010 at 4:54 PM, fabb...@google.com wrote: http://gwt-code-reviews.appspot.com/685801/diff/1/2#newcode594 dev/core/src/com/google/gwt/core/ext/typeinfo/TypeOracle.java:594: return result; Cool, but is this better than stabilizing allTypes.values itself? Yes... I thought about making allTypes a TreeSet, but the thing is, TypeOracle.allTypes() has almost no callers. It's just test code, and symbol dumping. Whereas, making it a TreeSet would have a performance impact every time you build a TypeOracle, which is the 99% case. http://gwt-code-reviews.appspot.com/685801/diff/1/3 File dev/core/src/com/google/gwt/dev/Precompile.java (left): http://gwt-code-reviews.appspot.com/685801/diff/1/3#oldcode479 dev/core/src/com/google/gwt/dev/Precompile.java:479: } but shouldn't we dump sometimes? Or is this block full-up buggy, and the real dump is elsewhere? See my in-flight note. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Refactoring to one top level class per .java file, since some (issue686801)
Reviewers: jat, Description: Refactoring to one top level class per .java file, since some tools don't understand more than that. Review by: jat Please review this at http://gwt-code-reviews.appspot.com/686801/show Affected files: M dev/core/super/com/google/gwt/lang/LongLibBase.java A user/src/com/google/gwt/i18n/tools/ArgHandlerValueChooser.java M user/src/com/google/gwt/i18n/tools/I18NSync.java M user/src/com/google/gwt/junit/BatchingStrategy.java A user/src/com/google/gwt/junit/ClassBatchingStrategy.java M user/src/com/google/gwt/junit/CompileStrategy.java A user/src/com/google/gwt/junit/ModuleBatchingStrategy.java A user/src/com/google/gwt/junit/NoBatchingStrategy.java A user/src/com/google/gwt/junit/ParallelCompileStrategy.java A user/src/com/google/gwt/junit/PreCompileStrategy.java A user/src/com/google/gwt/junit/SimpleCompileStrategy.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fix some bugs in symbol dumping. (issue685801)
LGTM On Mon, Jul 12, 2010 at 4:58 PM, Scott Blum sco...@google.com wrote: On Mon, Jul 12, 2010 at 4:54 PM, fabb...@google.com wrote: http://gwt-code-reviews.appspot.com/685801/diff/1/2#newcode594 dev/core/src/com/google/gwt/core/ext/typeinfo/TypeOracle.java:594: return result; Cool, but is this better than stabilizing allTypes.values itself? Yes... I thought about making allTypes a TreeSet, but the thing is, TypeOracle.allTypes() has almost no callers. It's just test code, and symbol dumping. Whereas, making it a TreeSet would have a performance impact every time you build a TypeOracle, which is the 99% case. http://gwt-code-reviews.appspot.com/685801/diff/1/3 File dev/core/src/com/google/gwt/dev/Precompile.java (left): http://gwt-code-reviews.appspot.com/685801/diff/1/3#oldcode479 dev/core/src/com/google/gwt/dev/Precompile.java:479: } but shouldn't we dump sometimes? Or is this block full-up buggy, and the real dump is elsewhere? See my in-flight note. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Refactoring to one top level class per .java file, since some (issue686801)
LGTM, though do all the *Strategy ones need to be top-level classes rather than static nested classes? http://gwt-code-reviews.appspot.com/686801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: Refactoring to one top level class per .java file, since some (issue686801)
+1. Static nested FTW. :) On Mon, Jul 12, 2010 at 5:14 PM, j...@google.com wrote: LGTM, though do all the *Strategy ones need to be top-level classes rather than static nested classes? http://gwt-code-reviews.appspot.com/686801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r8377 committed - Fix some bugs in symbol dumping....
Revision: 8377 Author: gwt.mirror...@gmail.com Date: Mon Jul 12 14:25:43 2010 Log: Fix some bugs in symbol dumping. 1) Fixes an NPE when dumping symbols with -validateOnly. 2) Fixes unstable sort order being returned from TypeOracle.getTypes(). Review at http://gwt-code-reviews.appspot.com/685801 Review by: fabb...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=8377 Modified: /trunk/dev/core/src/com/google/gwt/core/ext/typeinfo/TypeOracle.java /trunk/dev/core/src/com/google/gwt/dev/Precompile.java === --- /trunk/dev/core/src/com/google/gwt/core/ext/typeinfo/TypeOracle.java Tue Jun 22 10:07:56 2010 +++ /trunk/dev/core/src/com/google/gwt/core/ext/typeinfo/TypeOracle.java Mon Jul 12 11:20:44 2010 @@ -584,7 +584,14 @@ */ public JClassType[] getTypes() { CollectionJRealClassType values = allTypes.values(); -return values.toArray(new JClassType[values.size()]); +JClassType[] result = values.toArray(new JClassType[values.size()]); +Arrays.sort(result, new ComparatorJClassType() { + public int compare(JClassType o1, JClassType o2) { +return o1.getQualifiedSourceName().compareTo( +o2.getQualifiedSourceName()); + } +}); +return result; } public JWildcardType getWildcardType(JWildcardType.BoundType boundType, === --- /trunk/dev/core/src/com/google/gwt/dev/Precompile.java Fri Jun 18 04:59:26 2010 +++ /trunk/dev/core/src/com/google/gwt/dev/Precompile.java Mon Jul 12 11:20:44 2010 @@ -472,11 +472,6 @@ module.getActiveLinkerNames()), genDir); // Allow GC later. compilationState = null; - if (dumpSignatureFile != null) { -// Dump early to avoid generated types. -SignatureDumper.dumpSignatures(logger, -compilationState.getTypeOracle(), dumpSignatureFile); - } // Never optimize on a validation run. jjsOptions.setOptimizePrecompile(false); getCompiler(module).precompile(logger, module, rpo, declEntryPts, -- http://groups.google.com/group/Google-Web-Toolkit-Contributors