[gwt-contrib] Re: Add more TCK tests (issue1298802)
http://gwt-code-reviews.appspot.com/1298802/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Add more TCK tests (issue1298802)
Reviewers: rchandia, Description: Add more TCK tests [JSR 303 TCK Result] 90 of 257 (35.02%) Pass with 29 Failures and 12 Errors. Please review this at http://gwt-code-reviews.appspot.com/1298802/show Affected files: M user/test/com/google/gwt/validation/tck/MetadataGwtSuite.java M user/test/com/google/gwt/validation/tck/ValidationGwtSuite.java A user/test/org/hibernate/jsr303/tck/tests/metadata/ConstraintDescriptorGwtTest.java A user/test/org/hibernate/jsr303/tck/tests/metadata/ElementDescriptorGwtTest.java A user/test/org/hibernate/jsr303/tck/tests/metadata/PropertyDescriptorGwtTest.java M user/test/org/hibernate/jsr303/tck/tests/metadata/TckTestValidatorFactory.java M user/test/org/hibernate/jsr303/tck/tests/validation/TckTestValidatorFactory.java A user/test/org/hibernate/jsr303/tck/tests/validation/ValidateGwtTest.java M user/test/org/hibernate/jsr303/tck/tests/validation/ValidatePropertyGwtTest.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fix NPE in samples/expenses (issue1326801)
LGTM http://gwt-code-reviews.appspot.com/1326801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add SSL support to DevMode. (issue1324801)
LGTM given changes to ServletContainerLaunch and removal of SecureServletContainerLauncher. http://gwt-code-reviews.appspot.com/1324801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r9618 committed - Fix missing line in Javadoc....
Revision: 9618 Author: j...@google.com Date: Tue Jan 25 13:08:09 2011 Log: Fix missing line in Javadoc. Issue: 5615 Suggested by: xerces9 Patch by: jat Review by: conroy http://code.google.com/p/google-web-toolkit/source/detail?r=9618 Modified: /trunk/user/src/com/google/gwt/i18n/client/DateTimeFormat.java === --- /trunk/user/src/com/google/gwt/i18n/client/DateTimeFormat.java Wed Oct 20 12:39:18 2010 +++ /trunk/user/src/com/google/gwt/i18n/client/DateTimeFormat.java Tue Jan 25 13:08:09 2011 @@ -752,6 +752,7 @@ * pattern for this format is predefined for each locale. * * @return A DateTimeFormat object + * @deprecated use {@link #getFormat(PredefinedFormat)} with * {@link PredefinedFormat#DATE_TIME_MEDIUM} instead */ @Deprecated -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add SSL support to DevMode. (issue1324801)
http://gwt-code-reviews.appspot.com/1324801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r9616 committed - In the LoadModuleMessage, send the application supplied URL rather tha...
Revision: 9616 Author: con...@google.com Date: Tue Jan 25 12:47:44 2011 Log: In the LoadModuleMessage, send the application supplied URL rather than the plugin's view of the URL. This fixes the devmode tab title to display 'NewWebApp' or equivalent instead of 'hosted'. http://code.google.com/p/google-web-toolkit/issues/detail?id=5908 Review at http://gwt-code-reviews.appspot.com/1318801 http://code.google.com/p/google-web-toolkit/source/detail?r=9616 Modified: /trunk/plugins/npapi/ScriptableInstance.cpp /trunk/plugins/npapi/prebuilt/gwt-dev-plugin/Darwin-gcc3/gwtDev.plugin/Contents/MacOS/libGwtDevPlugin.dylib /trunk/plugins/npapi/prebuilt/gwt-dev-plugin/Linux_x86-gcc3/libGwtDevPlugin.so /trunk/plugins/npapi/prebuilt/gwt-dev-plugin/Linux_x86_64-gcc3/libGwtDevPlugin.so /trunk/plugins/npapi/prebuilt/gwt-dev-plugin/WINNT_x86-msvc/npGwtDevPlugin.dll /trunk/plugins/npapi/prebuilt/gwt-dev-plugin/manifest.json /trunk/plugins/npapi/prebuilt/gwt-dev-plugin.crx === --- /trunk/plugins/npapi/ScriptableInstance.cpp Tue Nov 23 05:51:12 2010 +++ /trunk/plugins/npapi/ScriptableInstance.cpp Tue Jan 25 12:47:44 2011 @@ -352,8 +352,15 @@ result->type = NPVariantType_Void; return; } - //ignore args[0]. Get the URL from window.location.href instead. + + // application provided URL string used for user facing things like the + // devmode tab title + const NPString appUrl = args[0].value.stringValue; + const string appUrlStr = convertToString(appUrl); + + // window.location.href provided URL. (used for security) const string urlStr = getLocationHref(); + const NPString sessionKey = args[1].value.stringValue; const NPString hostAddr = args[2].value.stringValue; const NPString moduleName = args[3].value.stringValue; @@ -405,7 +412,7 @@ string tabKeyStr = computeTabIdentity(); string sessionKeyStr = convertToString(sessionKey); Debug::log(Debug::Debugging) << " connected, sending loadModule" << Debug::flush; - connected = LoadModuleMessage::send(*_channel, urlStr, tabKeyStr, sessionKeyStr, + connected = LoadModuleMessage::send(*_channel, appUrlStr, tabKeyStr, sessionKeyStr, moduleNameStr, userAgent, this); BOOLEAN_TO_NPVARIANT(connected, *result); result->type = NPVariantType_Bool; === --- /trunk/plugins/npapi/prebuilt/gwt-dev-plugin/Darwin-gcc3/gwtDev.plugin/Contents/MacOS/libGwtDevPlugin.dylib Wed Jan 12 09:43:25 2011 +++ /trunk/plugins/npapi/prebuilt/gwt-dev-plugin/Darwin-gcc3/gwtDev.plugin/Contents/MacOS/libGwtDevPlugin.dylib Tue Jan 25 12:47:44 2011 Binary file, no diff available. === --- /trunk/plugins/npapi/prebuilt/gwt-dev-plugin/Linux_x86-gcc3/libGwtDevPlugin.so Wed Jan 12 09:43:25 2011 +++ /trunk/plugins/npapi/prebuilt/gwt-dev-plugin/Linux_x86-gcc3/libGwtDevPlugin.so Tue Jan 25 12:47:44 2011 File is too large to display a diff. === --- /trunk/plugins/npapi/prebuilt/gwt-dev-plugin/Linux_x86_64-gcc3/libGwtDevPlugin.so Wed Jan 12 09:43:25 2011 +++ /trunk/plugins/npapi/prebuilt/gwt-dev-plugin/Linux_x86_64-gcc3/libGwtDevPlugin.so Tue Jan 25 12:47:44 2011 File is too large to display a diff. === --- /trunk/plugins/npapi/prebuilt/gwt-dev-plugin/WINNT_x86-msvc/npGwtDevPlugin.dll Wed Jan 12 09:43:25 2011 +++ /trunk/plugins/npapi/prebuilt/gwt-dev-plugin/WINNT_x86-msvc/npGwtDevPlugin.dll Tue Jan 25 12:47:44 2011 Binary file, no diff available. === --- /trunk/plugins/npapi/prebuilt/gwt-dev-plugin/manifest.json Wed Jan 12 09:43:25 2011 +++ /trunk/plugins/npapi/prebuilt/gwt-dev-plugin/manifest.json Tue Jan 25 12:47:44 2011 @@ -1,6 +1,6 @@ { "name": "GWT Developer Plugin", - "version": "1.0.9521", + "version": "1.0.9614", "description": "A plugin to enable debugging with GWT's Development Mode", "update_url": "https://dl-ssl.google.com/gwt/plugins/chrome/updates.xml";, "icons": { === --- /trunk/plugins/npapi/prebuilt/gwt-dev-plugin.crx Wed Jan 12 09:43:25 2011 +++ /trunk/plugins/npapi/prebuilt/gwt-dev-plugin.crx Tue Jan 25 12:47:44 2011 Binary file, no diff available. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add Windows support to the FF4 plugin. (issue1327801)
LGTM http://gwt-code-reviews.appspot.com/1327801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Allows isBoolean() properties to be handled correctly by AutoBeanCodex. (issue1320801)
LGTM One more nit, your call, no need for re-review. http://gwt-code-reviews.appspot.com/1320801/diff/10001/11023 File user/src/com/google/gwt/requestfactory/rebind/model/RequestFactoryModel.java (right): http://gwt-code-reviews.appspot.com/1320801/diff/10001/11023#newcode240 user/src/com/google/gwt/requestfactory/rebind/model/RequestFactoryModel.java:240: Map duplicatePropertyGetters = new HashMap(); Seems like you're really using this as a set http://gwt-code-reviews.appspot.com/1320801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Allows isBoolean() properties to be handled correctly by AutoBeanCodex. (issue1320801)
http://gwt-code-reviews.appspot.com/1320801/diff/3001/4005 File user/src/com/google/gwt/autobean/rebind/model/JBeanMethod.java (right): http://gwt-code-reviews.appspot.com/1320801/diff/3001/4005#newcode30 user/src/com/google/gwt/autobean/rebind/model/JBeanMethod.java:30: public enum JBeanMethod { On 2011/01/25 18:09:38, rjrjr wrote: Might as well make constants for IS, HAS and GET Done. http://gwt-code-reviews.appspot.com/1320801/diff/3001/4024 File user/src/com/google/gwt/requestfactory/server/ReflectiveServiceLayer.java (right): http://gwt-code-reviews.appspot.com/1320801/diff/3001/4024#newcode74 user/src/com/google/gwt/requestfactory/server/ReflectiveServiceLayer.java:74: Class domainType, String property) { On 2011/01/25 18:09:38, rjrjr wrote: Should we check for redundant methods? (is or has or get, oh my)? Or perhaps the java bean spec has precedence defined? What a stupid, stupid convention this is. I updated RequestFactoryModel to disallow redundant property accessors boolean getFoo() and boolean isFoo(). We can figure out a more nuanced solution if anyone complains. http://gwt-code-reviews.appspot.com/1320801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Allows isBoolean() properties to be handled correctly by AutoBeanCodex. (issue1320801)
http://gwt-code-reviews.appspot.com/1320801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add SSL support to DevMode. (issue1324801)
http://gwt-code-reviews.appspot.com/1324801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Add Windows support to the FF4 plugin. (issue1327801)
Reviewers: jat, fabiomfv, Description: Add Windows support to the FF4 plugin. Also, fixup existing projects to align with our new GECKO_VERSION definition. Patch is really mostly by fabiomfv@, but it's just easier to add under my workspace. Please review this at http://gwt-code-reviews.appspot.com/1327801/show Affected files: A plugins/xpcom/VisualStudio/FirefoxPlugins.sln D plugins/xpcom/VisualStudio/ff2-xpcom.vcproj M plugins/xpcom/VisualStudio/ff3-xpcom.vcproj M plugins/xpcom/VisualStudio/ff35-xpcom.vcproj M plugins/xpcom/VisualStudio/ff36-xpcom.vcproj A plugins/xpcom/VisualStudio/ff40-xpcom.vcproj M plugins/xpcom/prebuilt/extension/chrome.manifest D plugins/xpcom/prebuilt/ff2/include/IOOPHM.h -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Fix NPE in samples/expenses (issue1326801)
Reviewers: rchandia, Description: Fix NPE in samples/expenses Please review this at http://gwt-code-reviews.appspot.com/1326801/show Affected files: M samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ExpenseTree.java Index: samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ExpenseTree.java === --- samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ExpenseTree.java (revision 9614) +++ samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ExpenseTree.java (working copy) @@ -287,6 +287,7 @@ lastDepartment = ""; } else if (selected instanceof EmployeeProxy) { lastEmployee = (EmployeeProxy) selected; + lastDepartment = lastEmployee.getDepartment(); } else if (selected instanceof String) { lastEmployee = null; if (model.isAllDepartment(selected)) { -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r9615 committed - If some unrecoverable failure happens during validation, a ValidationE...
Revision: 9615 Author: ncha...@google.com Date: Tue Jan 25 11:20:03 2011 Log: If some unrecoverable failure happens during validation, a ValidationException is raised. [JSR 303 TCK Result] 66 of 257 (25.68%) Pass with 25 Failures and 3 Errors. Review at http://gwt-code-reviews.appspot.com/1295803 Review by: rchan...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=9615 Modified: /trunk/user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java /trunk/user/test/org/hibernate/jsr303/tck/tests/validation/ValidatePropertyGwtTest.java === --- /trunk/user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java Tue Jan 25 07:30:57 2011 +++ /trunk/user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java Tue Jan 25 11:20:03 2011 @@ -230,9 +230,10 @@ @Override protected void compose(ClassSourceFileComposerFactory composerFactory) { -addImports(composerFactory, GWT.class, GwtBeanDescriptor.class, -GwtValidationContext.class, Set.class, HashSet.class, -ConstraintViolation.class, Annotation.class); +addImports(composerFactory, Annotation.class, ConstraintViolation.class, +GWT.class, GwtBeanDescriptor.class, GwtValidationContext.class, +HashSet.class, IllegalArgumentException.class, Set.class, +ValidationException.class); composerFactory.setSuperclass(AbstractGwtSpecificValidator.class.getCanonicalName() + "<" + beanType.getQualifiedSourceName() + ">"); composerFactory.addImplementedInterface(validatorType.getName()); @@ -536,6 +537,36 @@ sw.outdent(); sw.outdent(); } + + private void writeCatchUnexpectedException(SourceWriter sw, String message) { +// } catch (IllegalArgumentException e) { +sw.outdent(); +sw.println("} catch (IllegalArgumentException e) {"); +sw.indent(); + +// throw e; +sw.println("throw e;"); + +// } catch (ValidationException e) { +sw.outdent(); +sw.println("} catch (ValidationException e) {"); +sw.indent(); + +// throw e; +sw.println("throw e;"); + +// } catch (Exception e) { +sw.outdent(); +sw.println("} catch (Exception e) {"); +sw.indent(); + +// throw new ValidationException("my message", e); +sw.println("throw new ValidationException(" + message + ", e);"); + +// } +sw.outdent(); +sw.println("}"); + } private void writeConstraintDescriptor(SourceWriter sw, ConstraintDescriptor constraint, @@ -893,6 +924,10 @@ sw.println("Class... groups) {"); sw.outdent(); +// try { +sw.println("try {"); +sw.indent(); + writeNewViolations(sw); if (beanHelper.getBeanDescriptor().isBeanConstrained()) { @@ -956,6 +991,10 @@ // return violations; sw.println("return violations;"); +writeCatchUnexpectedException( +sw, +"\"Error validating " + beanHelper.getTypeCanonicalName() + "\""); + sw.outdent(); sw.println("}"); } @@ -1173,15 +1212,19 @@ sw.println("public Set> validateProperty("); // GwtValidationContext context, BeanType object, String propertyName, -// Class... groups) { +// Class... groups) throws ValidationException { sw.indent(); sw.indent(); sw.println("GwtValidationContext context,"); sw.println(beanHelper.getTypeCanonicalName() + " object,"); sw.println("String propertyName,"); -sw.println("Class... groups) {"); +sw.println("Class... groups) throws ValidationException {"); sw.outdent(); +// try { +sw.println("try {"); +sw.indent(); + writeNewViolations(sw); for (PropertyDescriptor property : beanHelper.getBeanDescriptor().getConstrainedProperties()) { @@ -1207,6 +1250,12 @@ // return violations; sw.println("return violations;"); +writeCatchUnexpectedException( +sw, +"\"Error validating \" + propertyName + \" of " ++ beanHelper.getTypeCanonicalName() + "\""); + +// } sw.outdent(); sw.println("}"); } @@ -1257,8 +1306,7 @@ // throw new ValidationException(value.getClass + // " is not a valid type for " + propertyName); - sw.print("throw new "); - sw.print(ValidationException.class.getCanonicalName()); + sw.print("throw new ValidationException"); sw.println("(value.getClass() +\" is not a valid type for \"+ propertyName);"); // } @@ -1365,6 +1413,10 @@ sw.println("Class... groups) {"); sw.outdent(); +// try { +sw.println("try {"); +sw.indent(); + writeNewViolations(sw); for (PropertyDescriptor property : @@ -1393,6 +1445,11 @@ // return violations; sw.println("return violations;"); +writeCatchUnexpectedException( +sw, +"\"Error validating \" + propertyName + \" of " ++ beanHelper.getTypeCanonicalName() + "\""); + sw.outdent(); sw.println(
[gwt-contrib] Re: Add SSL support to DevMode. (issue1324801)
LGTM + readme nits http://gwt-code-reviews.appspot.com/1324801/diff/17001/18007 File dev/core/src/com/google/gwt/dev/shell/jetty/README-SSL.txt (right): http://gwt-code-reviews.appspot.com/1324801/diff/17001/18007#newcode17 dev/core/src/com/google/gwt/dev/shell/jetty/README-SSL.txt:17: -server :keystore=/path/to/keystore,password=password insert an 'OR' here. http://gwt-code-reviews.appspot.com/1324801/diff/17001/18007#newcode18 dev/core/src/com/google/gwt/dev/shell/jetty/README-SSL.txt:18: -server :keystore=/path/to/keystore,pwfile=/path/to/password/file thanks for adding the pwfile option! I would suggest adding something along the lines of: "You can specify the password directly on the command line using the 'password=' option or you may specify a file that contains the password using the 'pwfile=' option. The former method is insecure and should not be used if you care about keeping the password secret from other users on your system. http://gwt-code-reviews.appspot.com/1324801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Fixing a bug in CellBrowser where the user must click on an element twice to focus on it and ena... (issue1290803)
Reviewers: rchandia, Description: Fixing a bug in CellBrowser where the user must click on an element twice to focus on it and enable keyboard support. The problem is that Element.getTabIndex() returns 0 for non-focusable divs, which causes us to assume that the div is focusable. Other browsers return -1 for non-focusable divs. Unfortunately, there is no good way to fix the bug in Element.getTabIndex() because the only way to determine if an element is natively focusable, such as a text box, is to compare the element tagName to a list of known natively focusable element, which isn't scalable. For now, I worked around it in CellBasedWidgetImpl. Issue: 5916 Please review this at http://gwt-code-reviews.appspot.com/1290803/show Affected files: M user/src/com/google/gwt/user/cellview/client/CellBasedWidgetImpl.java M user/src/com/google/gwt/user/cellview/client/CellBasedWidgetImplTrident.java Index: user/src/com/google/gwt/user/cellview/client/CellBasedWidgetImpl.java === --- user/src/com/google/gwt/user/cellview/client/CellBasedWidgetImpl.java (revision 9614) +++ user/src/com/google/gwt/user/cellview/client/CellBasedWidgetImpl.java (working copy) @@ -50,7 +50,7 @@ /** * The set of natively focusable elements. */ - private final Set focusableTypes; + final Set focusableTypes; CellBasedWidgetImpl() { focusableTypes = new HashSet(); Index: user/src/com/google/gwt/user/cellview/client/CellBasedWidgetImplTrident.java === --- user/src/com/google/gwt/user/cellview/client/CellBasedWidgetImplTrident.java (revision 9614) +++ user/src/com/google/gwt/user/cellview/client/CellBasedWidgetImplTrident.java (working copy) @@ -247,6 +247,12 @@ } @Override + public boolean isFocusable(Element elem) { +return focusableTypes.contains(elem.getTagName().toLowerCase()) +|| getTabIndexIfSpecified(elem) >= 0; + } + + @Override public void onBrowserEvent(final Widget widget, Event event) { // We need to remove the event listener from the cell now that the event // has fired. @@ -342,6 +348,16 @@ } /** + * Get the tab index of an element if the tab index is specified. + * + * @param elem the Element + * @return the tab index, or -1 if not specified + */ + private native int getTabIndexIfSpecified(Element elem) /*-{ +return elem.getAttributeNode('tabIndex').specified ? elem.tabIndex : -1; + }-*/; + + /** * Initialize the focus event listener. */ private native void initFocusEventSystem() /*-{ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add SSL support to DevMode. (issue1324801)
http://gwt-code-reviews.appspot.com/1324801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add SSL support to DevMode. (issue1324801)
http://gwt-code-reviews.appspot.com/1324801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fixing a bug in DynaTableRf where multiple stale responses can push data into the CellTable, cre... (issue1325801)
committed as r9614 http://gwt-code-reviews.appspot.com/1325801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Generator Result Caching implementation for ClientBundle (issue1236801)
http://gwt-code-reviews.appspot.com/1236801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Generator Result Caching implementation for ClientBundle (issue1236801)
http://gwt-code-reviews.appspot.com/1236801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add option to use JSONP in ExternalTextResource (issue1310801)
http://gwt-code-reviews.appspot.com/1310801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r9614 committed - Fixing a bug in DynaTableRf where multiple stale responses can push da...
Revision: 9614 Author: gwt.mirror...@gmail.com Date: Tue Jan 25 09:52:49 2011 Log: Fixing a bug in DynaTableRf where multiple stale responses can push data into the CellTable, creating an infinite loop where each stale response changes the table range, triggering another request. Also abstracting the ImageButtons used in SimplePager, and fixing a bug where disabled buttons were still clickable. Review at http://gwt-code-reviews.appspot.com/1325801 Review by: rj...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=9614 Modified: /trunk/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/SummaryWidget.java /trunk/user/src/com/google/gwt/user/cellview/client/SimplePager.java === --- /trunk/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/SummaryWidget.java Tue Jan 25 08:05:30 2011 +++ /trunk/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/SummaryWidget.java Tue Jan 25 09:52:49 2011 @@ -240,6 +240,10 @@ new Receiver>() { @Override public void onSuccess(List response) { +if (lastFetch != start) { + return; +} + int responses = response.size(); table.setRowData(start, response); pager.setPageStart(start); === --- /trunk/user/src/com/google/gwt/user/cellview/client/SimplePager.java Wed Oct 6 10:05:51 2010 +++ /trunk/user/src/com/google/gwt/user/cellview/client/SimplePager.java Tue Jan 25 09:52:49 2011 @@ -1,12 +1,12 @@ /* * Copyright 2010 Google Inc. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the @@ -24,6 +24,7 @@ import com.google.gwt.resources.client.ImageResource; import com.google.gwt.resources.client.ImageResource.ImageOptions; import com.google.gwt.uibinder.client.UiConstructor; +import com.google.gwt.user.client.Event; import com.google.gwt.user.client.ui.HTML; import com.google.gwt.user.client.ui.HasVerticalAlignment; import com.google.gwt.user.client.ui.HorizontalPanel; @@ -34,7 +35,7 @@ /** * A pager for controlling a {@link HasRows} that only supports simple page * navigation. - * + * * * Example * {@example com.google.gwt.examples.cellview.SimplePagerExample} @@ -141,6 +142,53 @@ public static enum TextLocation { CENTER, LEFT, RIGHT; } + + /** + * An {@link Image} that acts as a button. + */ + private static class ImageButton extends Image { +private boolean disabled; +private final ImageResource resDisabled; +private final ImageResource resEnabled; +private final String styleDisabled; + +public ImageButton(ImageResource resEnabled, ImageResource resDiabled, +String disabledStyle) { + super(resEnabled); + this.resEnabled = resEnabled; + this.resDisabled = resDiabled; + this.styleDisabled = disabledStyle; +} + +public boolean isDisabled() { + return disabled; +} + +@Override +public void onBrowserEvent(Event event) { + // Ignore events if disabled. + if (disabled) { +return; + } + + super.onBrowserEvent(event); +} + +public void setDisabled(boolean isDisabled) { + if (this.disabled == isDisabled) { +return; + } + + this.disabled = isDisabled; + if (disabled) { +setResource(resDisabled); +getElement().getParentElement().addClassName(styleDisabled); + } else { +setResource(resEnabled); +getElement().getParentElement().removeClassName(styleDisabled); + } +} + } private static int DEFAULT_FAST_FORWARD_ROWS = 1000; private static Resources DEFAULT_RESOURCES; @@ -152,32 +200,20 @@ return DEFAULT_RESOURCES; } - private final Image fastForward; + private final ImageButton fastForward; private final int fastForwardRows; - private final Image firstPage; + private final ImageButton firstPage; /** * We use an {@link HTML} so we can embed the loading image. */ private final HTML label = new HTML(); - private final Image lastPage; - - /** - * Set to true when the next and last buttons are disabled. - */ - private boolean nextDisabled; - - private final Image nextPage; - - /** - * Set to true when the prev and first buttons are disabled. - */ - private boolean prevDisabled; - - private final Image prevPage; + private final ImageButton lastPage; + private final ImageButton nextPage; + private final ImageButton p
[gwt-contrib] [google-web-toolkit] r9612 committed - Cherry picking r9602 into releases/2.2
Revision: 9612 Author: p...@google.com Date: Tue Jan 25 08:49:05 2011 Log: Cherry picking r9602 into releases/2.2 http://code.google.com/p/google-web-toolkit/source/detail?r=9612 Added: /releases/2.2/user/src/com/google/gwt/dom/client/PartialSupport.java Deleted: /releases/2.2/user/src/com/google/gwt/user/client/IsSupported.java Modified: /releases/2.2/user/src/com/google/gwt/canvas/Canvas.gwt.xml /releases/2.2/user/src/com/google/gwt/canvas/client/Canvas.java /releases/2.2/user/test/com/google/gwt/canvas/client/CanvasTest.java /releases/2.2/user/test/com/google/gwt/canvas/dom/client/Context2dTest.java === --- /dev/null +++ /releases/2.2/user/src/com/google/gwt/dom/client/PartialSupport.java Tue Jan 25 08:49:05 2011 @@ -0,0 +1,34 @@ +/* + * Copyright 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.google.gwt.dom.client; + +/** + * Annotation for classes that are only supported on a limited set of browsers. + * + * + * By convention, classes annotated with PartialSupport will provide two static + * methods: + * + *static boolean isSupported() that returns whether the + * feature is supported. + *static YourType createIfSupported() factory method that + * returns a new feature if supported, or null otherwise. + * + * + */ +public @interface PartialSupport { + +} === --- /releases/2.2/user/src/com/google/gwt/user/client/IsSupported.java Thu Jan 13 07:07:25 2011 +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2010 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -package com.google.gwt.user.client; - -/** - * Interface for classes that are only supported on a limited set of browsers. - * - * - * Experimental API: This API is still under development - * and is subject to change. - * - * - * - * By convention, classes that implement IsSupported will provide a static - * method boolean isSupported() that checks whether the feature is - * supported at runtime. - */ -public interface IsSupported { - -} === --- /releases/2.2/user/src/com/google/gwt/canvas/Canvas.gwt.xml Tue Nov 30 06:11:17 2010 +++ /releases/2.2/user/src/com/google/gwt/canvas/Canvas.gwt.xml Tue Jan 25 08:49:05 2011 @@ -16,5 +16,30 @@ + + + + + + + + + + + + + + + + class="com.google.gwt.canvas.client.Canvas.CanvasElementSupportDetectedMaybe"> +class="com.google.gwt.canvas.client.Canvas.CanvasElementSupportDetector" /> + + + + class="com.google.gwt.canvas.client.Canvas.CanvasElementSupportDetectedNo"> +class="com.google.gwt.canvas.client.Canvas.CanvasElementSupportDetector" /> + + + === --- /releases/2.2/user/src/com/google/gwt/canvas/client/Canvas.java Thu Jan 13 07:07:25 2011 +++ /releases/2.2/user/src/com/google/gwt/canvas/client/Canvas.java Tue Jan 25 08:49:05 2011 @@ -17,9 +17,10 @@ import com.google.gwt.canvas.dom.client.Context; import com.google.gwt.canvas.dom.client.Context2d; +import com.google.gwt.core.client.GWT; import com.google.gwt.dom.client.CanvasElement; import com.google.gwt.dom.client.Document; -import com.google.gwt.user.client.IsSupported; +import com.google.gwt.dom.client.PartialSupport; import com.google.gwt.user.client.ui.FocusWidget; /** @@ -31,25 +32,55 @@ * * * - * This widget may not be supported on all browsers, see {@link IsSupported} + * This widget may not be supported on all browsers. */ -public class Canvas extends FocusWidget implements IsSupported { +@PartialSupport +public class Canvas extends FocusWidget { + private static CanvasElementSupportDetector detector; + + /** + * Return a new {@link Canvas} if supported, and null otherwise. + * + * @return a new {@link Canvas} if supported, and null otherwise + *
[gwt-contrib] [google-web-toolkit] r9613 committed - Remove experimental warning from Canvas and clean up javadoc....
Revision: 9613 Author: p...@google.com Date: Tue Jan 25 09:01:38 2011 Log: Remove experimental warning from Canvas and clean up javadoc. Review at http://gwt-code-reviews.appspot.com/1286802 Review by: rj...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=9613 Modified: /trunk/user/src/com/google/gwt/canvas/client/Canvas.java /trunk/user/src/com/google/gwt/canvas/dom/client/CanvasGradient.java /trunk/user/src/com/google/gwt/canvas/dom/client/CanvasPattern.java /trunk/user/src/com/google/gwt/canvas/dom/client/CanvasPixelArray.java /trunk/user/src/com/google/gwt/canvas/dom/client/Context.java /trunk/user/src/com/google/gwt/canvas/dom/client/Context2d.java /trunk/user/src/com/google/gwt/canvas/dom/client/CssColor.java /trunk/user/src/com/google/gwt/canvas/dom/client/FillStrokeStyle.java /trunk/user/src/com/google/gwt/canvas/dom/client/ImageData.java /trunk/user/src/com/google/gwt/canvas/dom/client/TextMetrics.java /trunk/user/src/com/google/gwt/dom/client/CanvasElement.java === --- /trunk/user/src/com/google/gwt/canvas/client/Canvas.java Mon Jan 24 12:09:10 2011 +++ /trunk/user/src/com/google/gwt/canvas/client/Canvas.java Tue Jan 25 09:01:38 2011 @@ -26,12 +26,6 @@ /** * A widget representing a
[gwt-contrib] [google-web-toolkit] r9611 committed - Cherry picking r9609 into releases/2.2
Revision: 9611 Author: rchan...@google.com Date: Tue Jan 25 08:46:02 2011 Log: Cherry picking r9609 into releases/2.2 http://code.google.com/p/google-web-toolkit/source/detail?r=9611 Added: /releases/2.2/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/ScheduleEditor.java /releases/2.2/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/ScheduleEditor.ui.xml /releases/2.2/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/TimeSlotListWidget.java /releases/2.2/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/TimeSlotListWidget.ui.xml /releases/2.2/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/server/ScheduleFuzzer.java /releases/2.2/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/server/ScheduleLocator.java /releases/2.2/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/server/ScheduleService.java /releases/2.2/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/server/ScheduleServiceLocator.java /releases/2.2/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/server/ScheduleSource.java /releases/2.2/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/shared/ScheduleProxy.java /releases/2.2/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/shared/TimeSlotProxy.java Modified: /releases/2.2/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/PersonEditorWorkflow.java /releases/2.2/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/PersonEditor.java /releases/2.2/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/PersonEditor.ui.xml /releases/2.2/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/SummaryWidget.java /releases/2.2/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/domain/Person.java /releases/2.2/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/domain/Schedule.java /releases/2.2/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/domain/TimeSlot.java /releases/2.2/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/server/PersonFuzzer.java /releases/2.2/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/server/PersonSource.java /releases/2.2/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/server/SchoolCalendarService.java /releases/2.2/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/shared/DynaTableRequestFactory.java /releases/2.2/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/shared/PersonProxy.java === --- /dev/null +++ /releases/2.2/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/ScheduleEditor.java Tue Jan 25 08:46:02 2011 @@ -0,0 +1,45 @@ +/* + * Copyright 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.google.gwt.sample.dynatablerf.client.widgets; + +import com.google.gwt.core.client.GWT; +import com.google.gwt.editor.client.Editor; +import com.google.gwt.sample.dynatablerf.shared.ScheduleProxy; +import com.google.gwt.uibinder.client.UiBinder; +import com.google.gwt.uibinder.client.UiField; +import com.google.gwt.user.client.ui.Composite; +import com.google.gwt.user.client.ui.Widget; + +/** + * Edits a persons's schedule. + */ +public class ScheduleEditor extends Composite implements Editor { + + interface ScheduleEditorUiBinder extends UiBinderScheduleEditor> { + } + + private static ScheduleEditorUiBinder uiBinder = GWT.create( + ScheduleEditorUiBinder.class); + + @UiField(provided = true) + TimeSlotListWidget timeSlots; + + public ScheduleEditor(TimeSlotListWidget timeSlotEditor) { +timeSlots = timeSlotEditor; +initWidget(uiBinder.createAndBindUi(this)); + } + +} === --- /dev/null +++ /releases/2.2/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/ScheduleEditor.ui.xml Tue Jan 25 08:46:02 2011 @@ -0,0 +1,13 @@ +http://dl.google.com/gwt/DTD/xhtml.ent";> + + +.table { + width: 100%; +} + + +stylePrimaryName="{style.table}" /> + + === --- /dev/null +++ /releases/2.2/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/TimeSlotListWidget.java Tue Jan 25 08:46:02 2011 @@ -0,0 +1,267 @@ +/* + * Copyright 2011 Google Inc. + * + * Licensed und
[gwt-contrib] Re: Add option to use JSONP in ExternalTextResource (issue1310801)
http://gwt-code-reviews.appspot.com/1310801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fixing a bug in DynaTableRf where multiple stale responses can push data into the CellTable, cre... (issue1325801)
LGTM Nice cleanup. http://gwt-code-reviews.appspot.com/1325801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add option to use JSONP in ExternalTextResource (issue1310801)
http://gwt-code-reviews.appspot.com/1310801/diff/24001/25002 File user/src/com/google/gwt/jsonp/client/JsonpRequest.java (right): http://gwt-code-reviews.appspot.com/1310801/diff/24001/25002#newcode39 user/src/com/google/gwt/jsonp/client/JsonpRequest.java:39: On 2011/01/25 19:49:32, bobv wrote: Whitespace. Done. http://gwt-code-reviews.appspot.com/1310801/diff/24001/25002#newcode85 user/src/com/google/gwt/jsonp/client/JsonpRequest.java:85: // The "P" suffix must stay in sync with ExternalTextResourceGenerator.java On 2011/01/25 19:49:32, bobv wrote: Move this comment to the constant declaration. Done. http://gwt-code-reviews.appspot.com/1310801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add option to use JSONP in ExternalTextResource (issue1310801)
http://gwt-code-reviews.appspot.com/1310801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add option to use JSONP in ExternalTextResource (issue1310801)
LGTM, nits. Once the JSONP stuff is shown to work in production, can you swing back around and remove the XHR? http://gwt-code-reviews.appspot.com/1310801/diff/24001/25002 File user/src/com/google/gwt/jsonp/client/JsonpRequest.java (right): http://gwt-code-reviews.appspot.com/1310801/diff/24001/25002#newcode39 user/src/com/google/gwt/jsonp/client/JsonpRequest.java:39: Whitespace. http://gwt-code-reviews.appspot.com/1310801/diff/24001/25002#newcode85 user/src/com/google/gwt/jsonp/client/JsonpRequest.java:85: // The "P" suffix must stay in sync with ExternalTextResourceGenerator.java Move this comment to the constant declaration. http://gwt-code-reviews.appspot.com/1310801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Fixing a bug in DynaTableRf where multiple stale responses can push data into the CellTable, cre... (issue1325801)
Reviewers: rjrjr, Description: Fixing a bug in DynaTableRf where multiple stale responses can push data into the CellTable, creating an infinite loop where each stale response changes the table range, triggering another request. Also abstracting the ImageButtons used in SimplePager, and fixing a bug where disabled buttons were still clickable. Please review this at http://gwt-code-reviews.appspot.com/1325801/show Affected files: M samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/SummaryWidget.java M user/src/com/google/gwt/user/cellview/client/SimplePager.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Add SSL support to DevMode. (issue1324801)
Reviewers: conroy, tobyr, Description: Add SSL support to DevMode. Issue: 1806 Patch by: jat Review by: conroy, tobyr Please review this at http://gwt-code-reviews.appspot.com/1324801/show Affected files: A dev/core/src/com/google/gwt/core/ext/SecureServletContainerLauncher.java M dev/core/src/com/google/gwt/dev/DevMode.java M dev/core/src/com/google/gwt/dev/DevModeBase.java M dev/core/src/com/google/gwt/dev/RunWebApp.java M dev/core/src/com/google/gwt/dev/shell/jetty/JettyLauncher.java A dev/core/src/com/google/gwt/dev/shell/jetty/README-SSL.txt A eclipse/samples/Showcase/Showcase SSL.launch -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add option to use JSONP in ExternalTextResource (issue1310801)
http://gwt-code-reviews.appspot.com/1310801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r9610 committed - Adding jscpucfg.h for the windows build
Revision: 9610 Author: gwt.mirror...@gmail.com Date: Tue Jan 25 11:30:28 2011 Log: Adding jscpucfg.h for the windows build http://code.google.com/p/google-web-toolkit/source/detail?r=9610 Added: /plugin-sdks/gecko-sdks/gecko-2.0.0/WINNT_x86-msvc/include/jscpucfg.h === --- /dev/null +++ /plugin-sdks/gecko-sdks/gecko-2.0.0/WINNT_x86-msvc/include/jscpucfg.h Tue Jan 25 11:30:28 2011 @@ -0,0 +1,91 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * + * * BEGIN LICENSE BLOCK * + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Mozilla Communicator client code, released + * March 31, 1998. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of the GNU General Public License Version 2 or later (the "GPL"), + * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * * END LICENSE BLOCK * */ + +#ifndef js_cpucfg___ +#define js_cpucfg___ + +#define JS_HAVE_LONG_LONG + +#if defined(XP_WIN) || defined(XP_OS2) || defined(WINCE) + +#if defined(_WIN64) + +#if defined(_M_X64) || defined(_M_AMD64) || defined(_AMD64_) +#define IS_LITTLE_ENDIAN 1 +#undef IS_BIG_ENDIAN +#define JS_BYTES_PER_DOUBLE 8L +#define JS_BYTES_PER_WORD 8L +#define JS_BITS_PER_WORD_LOG2 6 +#define JS_ALIGN_OF_POINTER 8L +#else /* !(defined(_M_X64) || defined(_M_AMD64) || defined(_AMD64_)) */ +#error "CPU type is unknown" +#endif /* !(defined(_M_X64) || defined(_M_AMD64) || defined(_AMD64_)) */ + +#elif defined(_WIN32) || defined(XP_OS2) || defined(WINCE) + +#ifdef __WATCOMC__ +#define HAVE_VA_LIST_AS_ARRAY 1 +#endif + +#define IS_LITTLE_ENDIAN 1 +#undef IS_BIG_ENDIAN +#define JS_BYTES_PER_DOUBLE 8L +#define JS_BYTES_PER_WORD 4L +#define JS_BITS_PER_WORD_LOG2 5 +#define JS_ALIGN_OF_POINTER 4L + +#endif /* _WIN32 || XP_OS2 || WINCE*/ + +#elif defined(XP_UNIX) || defined(XP_BEOS) + +#error "This file is supposed to be auto-generated on UNIX platforms, but the" +#error "static version for Mac and Windows platforms is being used." +#error "Something's probably wrong with paths/headers/dependencies/Makefiles." + +#else + +#error "Must define one of XP_BEOS, XP_OS2, XP_WIN, or XP_UNIX" + +#endif + +#ifndef JS_STACK_GROWTH_DIRECTION +#define JS_STACK_GROWTH_DIRECTION (-1) +#endif + +#endif /* js_cpucfg___ */ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Updates DTRF to show the use of ServiceLocators and Locators. (issue1299801)
Submitted as of r9609 On 2011/01/25 18:39:13, rchandia wrote: http://gwt-code-reviews.appspot.com/1299801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r9609 committed - Updates DTRF to show the use of ServiceLocators and Locators....
Revision: 9609 Author: rchan...@google.com Date: Tue Jan 25 08:05:30 2011 Log: Updates DTRF to show the use of ServiceLocators and Locators. - Added editors to modify person schedules - Schedule is now a RF Entity and TimeSlot is now a VO - ScheduleLocator interfaces with "non standard" getKey and getRevision methods - ScheduleService provides a service method Review at http://gwt-code-reviews.appspot.com/1299801 Review by: rj...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=9609 Added: /trunk/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/ScheduleEditor.java /trunk/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/ScheduleEditor.ui.xml /trunk/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/TimeSlotListWidget.java /trunk/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/TimeSlotListWidget.ui.xml /trunk/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/server/ScheduleFuzzer.java /trunk/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/server/ScheduleLocator.java /trunk/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/server/ScheduleService.java /trunk/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/server/ScheduleServiceLocator.java /trunk/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/server/ScheduleSource.java /trunk/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/shared/ScheduleProxy.java /trunk/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/shared/TimeSlotProxy.java Modified: /trunk/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/PersonEditorWorkflow.java /trunk/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/PersonEditor.java /trunk/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/PersonEditor.ui.xml /trunk/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/SummaryWidget.java /trunk/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/domain/Person.java /trunk/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/domain/Schedule.java /trunk/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/domain/TimeSlot.java /trunk/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/server/PersonFuzzer.java /trunk/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/server/PersonSource.java /trunk/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/server/SchoolCalendarService.java /trunk/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/shared/DynaTableRequestFactory.java /trunk/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/shared/PersonProxy.java === --- /dev/null +++ /trunk/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/ScheduleEditor.java Tue Jan 25 08:05:30 2011 @@ -0,0 +1,45 @@ +/* + * Copyright 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.google.gwt.sample.dynatablerf.client.widgets; + +import com.google.gwt.core.client.GWT; +import com.google.gwt.editor.client.Editor; +import com.google.gwt.sample.dynatablerf.shared.ScheduleProxy; +import com.google.gwt.uibinder.client.UiBinder; +import com.google.gwt.uibinder.client.UiField; +import com.google.gwt.user.client.ui.Composite; +import com.google.gwt.user.client.ui.Widget; + +/** + * Edits a persons's schedule. + */ +public class ScheduleEditor extends Composite implements Editor { + + interface ScheduleEditorUiBinder extends UiBinderScheduleEditor> { + } + + private static ScheduleEditorUiBinder uiBinder = GWT.create( + ScheduleEditorUiBinder.class); + + @UiField(provided = true) + TimeSlotListWidget timeSlots; + + public ScheduleEditor(TimeSlotListWidget timeSlotEditor) { +timeSlots = timeSlotEditor; +initWidget(uiBinder.createAndBindUi(this)); + } + +} === --- /dev/null +++ /trunk/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/ScheduleEditor.ui.xml Tue Jan 25 08:05:30 2011 @@ -0,0 +1,13 @@ +http://dl.google.com/gwt/DTD/xhtml.ent";> + + +.table { + width: 100%; +} + + +stylePrimaryName="{style.table}" /> + + === --- /dev/null +++ /trunk/samples/dynatablerf/src/com/google/gwt/sample/dyn
[gwt-contrib] Re: - Use z-index to layer multiple notifications in hosted.html (issue1323801)
http://gwt-code-reviews.appspot.com/1323801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add option to use JSONP in ExternalTextResource (issue1310801)
http://gwt-code-reviews.appspot.com/1310801/diff/1/3 File user/src/com/google/gwt/jsonp/client/JsonpRequest.java (right): http://gwt-code-reviews.appspot.com/1310801/diff/1/3#newcode70 user/src/com/google/gwt/jsonp/client/JsonpRequest.java:70: } On 2011/01/24 14:31:26, bobv wrote: Extra whitespace. GPE usually prevents formatting weirdness. Done. http://gwt-code-reviews.appspot.com/1310801/diff/1/3#newcode75 user/src/com/google/gwt/jsonp/client/JsonpRequest.java:75: // The "P" suffix must stay in sync with ExternalTextResourceGenerator.java On 2011/01/24 14:31:26, bobv wrote: Use a shared constant field? Done. http://gwt-code-reviews.appspot.com/1310801/diff/1/3#newcode149 user/src/com/google/gwt/jsonp/client/JsonpRequest.java:149: String id) { On 2011/01/24 14:31:26, bobv wrote: Formatting. Done. http://gwt-code-reviews.appspot.com/1310801/diff/1/3#newcode219 user/src/com/google/gwt/jsonp/client/JsonpRequest.java:219: return callbackId.startsWith("P"); On 2011/01/24 14:31:26, bobv wrote: This seems kind of hacky. Is there a way to do this in a way that would prevent someone from accidentally triggering this behavior with a poorly-chosen prefix? Done. http://gwt-code-reviews.appspot.com/1310801/diff/1/3#newcode279 user/src/com/google/gwt/jsonp/client/JsonpRequest.java:279: if (!canHaveMultipleRequestsForId) { On 2011/01/24 14:31:26, bobv wrote: Could you reverse the order of the then and else clauses to prevent a negative comparison? Done. http://gwt-code-reviews.appspot.com/1310801/diff/1/3#newcode289 user/src/com/google/gwt/jsonp/client/JsonpRequest.java:289: if (callbackWrapper == null) { On 2011/01/24 14:31:26, bobv wrote: if (!callbackWrapper) is more idiomatic. Done. http://gwt-code-reviews.appspot.com/1310801/diff/1/5 File user/src/com/google/gwt/resources/Resources.gwt.xml (right): http://gwt-code-reviews.appspot.com/1310801/diff/1/5#newcode83 user/src/com/google/gwt/resources/Resources.gwt.xml:83: On 2011/01/24 14:31:26, bobv wrote: Why not always use JSONP? It's guaranteed to work across more deployment schemes than XHR, right? Mostly because I'm just a little nervous about changing the default behavior. I could be convinced if you feel strongly... Another option would be to leave it as is for now, and then flip the default value for the property (or remove the XHR implementation entirely if you feel strongly) once AW3 is successfully using this version. http://gwt-code-reviews.appspot.com/1310801/diff/1/6 File user/src/com/google/gwt/resources/client/impl/ExternalTextResourcePrototype.java (right): http://gwt-code-reviews.appspot.com/1310801/diff/1/6#newcode87 user/src/com/google/gwt/resources/client/impl/ExternalTextResourcePrototype.java:87: }; On 2011/01/24 14:31:26, bobv wrote: Extra whitespace. Done. http://gwt-code-reviews.appspot.com/1310801/diff/1/6#newcode170 user/src/com/google/gwt/resources/client/impl/ExternalTextResourcePrototype.java:170: // } On 2011/01/24 14:31:26, bobv wrote: Delete this? Actually - it should stay - I just commented it out for some debugging - good catch! http://gwt-code-reviews.appspot.com/1310801/diff/1/6#newcode172 user/src/com/google/gwt/resources/client/impl/ExternalTextResourcePrototype.java:172: if (!"".equals(md5Hash)) { On 2011/01/24 14:31:26, bobv wrote: How about a null comparison instead? Done. http://gwt-code-reviews.appspot.com/1310801/diff/1/7 File user/src/com/google/gwt/resources/rg/ExternalTextResourceGenerator.java (right): http://gwt-code-reviews.appspot.com/1310801/diff/1/7#newcode54 user/src/com/google/gwt/resources/rg/ExternalTextResourceGenerator.java:54: static final String JSONP_CALLBACK_PREFIX = "__gwt_jsonp__.P"; On 2011/01/24 14:31:26, bobv wrote: If the .P is special, it should be in a constant field. We discussed this in the previous CL - the problem is that if I want to make shared with the other file, then I cross the user/dev dependency boundary, so you said to go ahead and just add a comment to keep them in sync http://gwt-code-reviews.appspot.com/1310801/diff/1/7#newcode184 user/src/com/google/gwt/resources/rg/ExternalTextResourceGenerator.java:184: if (Boolean.parseBoolean(useJsonpProp)) { On 2011/01/24 14:31:26, bobv wrote: How about return Boolean.parseBoolean(useJsonProp); Done. http://gwt-code-reviews.appspot.com/1310801/diff/1/11 File user/test/com/google/gwt/resources/client/ExternalTextResourceJsonpTest.java (right): http://gwt-code-reviews.appspot.com/1310801/diff/1/11#newcode2 user/test/com/google/gwt/resources/client/ExternalTextResourceJsonpTest.java:2: * Copyright 2010 Google Inc. On 2011/01/24 14:31:26, bobv wrote: 2011 Done. http://gwt-code-reviews.appspot.com/1310801/diff/1/12 File user/test/com/google/gwt/resources/client/ExternalTextResourceTest.java (right): http://gwt-code-reviews.appspot.com/1310801/diff/1/12#newcode2 user/test/com/google/gwt/resources/client/ExternalTextResourceTest.java:2: * Copyright 2008 Google Inc. On 2011/01/
[gwt-contrib] [google-web-toolkit] r9608 committed - Throw an IllegalErgumentException if the property name is invalid....
Revision: 9608 Author: ncha...@google.com Date: Tue Jan 25 07:30:57 2011 Log: Throw an IllegalErgumentException if the property name is invalid. [JSR 303 TCK Result] 66 of 257 (25.68%) Pass with 25 Failures and 3 Errors. Review at http://gwt-code-reviews.appspot.com/1287802 Review by: rchan...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=9608 Modified: /trunk/user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java /trunk/user/test/org/hibernate/jsr303/tck/tests/validation/ValidateValueGwtTest.java === --- /trunk/user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java Mon Jan 24 10:40:07 2011 +++ /trunk/user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java Tue Jan 25 07:30:57 2011 @@ -32,7 +32,11 @@ import com.google.gwt.core.ext.typeinfo.NotFoundException; import com.google.gwt.core.ext.typeinfo.TypeOracle; import com.google.gwt.dev.jjs.ast.JProgram; +import com.google.gwt.thirdparty.guava.common.base.Function; +import com.google.gwt.thirdparty.guava.common.base.Functions; +import com.google.gwt.thirdparty.guava.common.base.Joiner; import com.google.gwt.thirdparty.guava.common.base.Predicate; +import com.google.gwt.thirdparty.guava.common.collect.ImmutableList; import com.google.gwt.thirdparty.guava.common.collect.Iterables; import com.google.gwt.thirdparty.guava.common.collect.Maps; import com.google.gwt.thirdparty.guava.common.collect.Sets; @@ -45,6 +49,9 @@ import com.google.gwt.validation.client.impl.GwtValidationContext; import com.google.gwt.validation.client.impl.PropertyDescriptorImpl; +import java.beans.BeanInfo; +import java.beans.IntrospectionException; +import java.beans.Introspector; import java.lang.annotation.Annotation; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; @@ -81,58 +88,73 @@ private static final JType[] NO_ARGS = new JType[]{}; + private static Function + PROPERTY_DESCRIPTOR_TO_NAME = + new Function() { +public String apply(java.beans.PropertyDescriptor pd) { + return pd.getName(); +} + }; + + private static Function TO_LITERAL = new Function() { + +public String apply(Object input) { + return asLiteral(input); +} + }; + /** - * Returns the literal value of an object that is suitable for inclusion in - * Java Source code. - * - * - * Supports all types that {@link Annotation) value can have. - * - * - * @throws IllegalArgumentException if the type of the object does not have a java literal form. - */ - public static String asLiteral(Object value) throws IllegalArgumentException { -Class clazz = value.getClass(); -JProgram jProgram = new JProgram(); - -if (clazz.isArray()) { - StringBuilder sb = new StringBuilder(); - Object[] array = (Object[]) value; - - sb.append("new " + clazz.getComponentType().getCanonicalName() + "[] "); - sb.append("{"); - boolean first = true; - for (Object object : array) { -if (first) { - first = false; -} else { - sb.append(","); -} -sb.append(asLiteral(object)); - } - sb.append("}"); - return sb.toString(); -} - -if (value instanceof Class) { - return ((Class) ((Class) value)).getCanonicalName() + ".class"; -} -if (value instanceof Double) { - return jProgram.getLiteralDouble(((Double) value).doubleValue()).toSource(); -} -if (value instanceof Integer) { - return jProgram.getLiteralInt(((Integer) value).intValue()).toSource(); -} -if (value instanceof Long) { - return jProgram.getLiteralLong(((Long) value).intValue()).toSource(); -} -if (value instanceof String) { - return '"' + Generator.escape((String) value) + '"'; -} -// TODO(nchalko) handle the rest of the literal types -throw new IllegalArgumentException(value.getClass() -+ " is can not be represented as a Java Literal."); - } + * Returns the literal value of an object that is suitable for inclusion in + * Java Source code. + * + * + * Supports all types that {@link Annotation) value can have. + * + * + * @throws IllegalArgumentException if the type of the object does not have a java literal form. + */ +public static String asLiteral(Object value) throws IllegalArgumentException { + Class clazz = value.getClass(); + JProgram jProgram = new JProgram(); + + if (clazz.isArray()) { +StringBuilder sb = new StringBuilder(); +Object[] array = (Object[]) value; + +sb.append("new " + clazz.getComponentType().getCanonicalName() + "[] "); +sb.append("{"); +boolean first = true; +for (Object object : array) { + if (first) { +first = false; + } else { +sb.append(","); + } +
[gwt-contrib] Re: Updates DTRF to show the use of ServiceLocators and Locators. (issue1299801)
http://gwt-code-reviews.appspot.com/1299801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Remove experimental warning from Canvas and clean up javadoc. (issue1286802)
LGTM http://gwt-code-reviews.appspot.com/1286802/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] - Use z-index to layer multiple notifications in hosted.html (issue1323801)
Reviewers: knorton, Description: - Use z-index to layer multiple notifications in hosted.html - ModuleSpace.java produces well formed HTML, replacing with Please review this at http://gwt-code-reviews.appspot.com/1323801/show Affected files: M dev/core/src/com/google/gwt/core/ext/linker/impl/devmode.js M dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html M dev/core/src/com/google/gwt/dev/shell/ModuleSpace.java Index: dev/core/src/com/google/gwt/core/ext/linker/impl/devmode.js === --- dev/core/src/com/google/gwt/core/ext/linker/impl/devmode.js (revision 9607) +++ dev/core/src/com/google/gwt/core/ext/linker/impl/devmode.js (working copy) @@ -111,6 +111,9 @@ + 'REFRESH this page.'); } +// Keep track of z-index to allow layering of multiple glass messages +var __gwt_glassMessageZIndex = 2147483647; + // Note this method is also used by ModuleSpace.java function __gwt_displayGlassMessage(summary, details) { var topWin = window.top; @@ -118,11 +121,13 @@ var outer = topDoc.createElement("div"); // Do not insert whitespace or outer.firstChild will get a text node. outer.innerHTML = -'style="position:absolute;z-index:2147483646;left:0px;top:0px;right:0px;bottom:0px;filter:alpha(opacity=75);opacity:0.75;background-color:#00;">' + -'style="position:absolute;z-index:2147483647;left:50px;top:50px;width:600px;color:#FF;font-family:verdana;">' + - '' + summary + '' + - '' + details + '' + -'' +'' + +'' + summary + '' + +'' + details + '' + +'' + +'' ; topDoc.body.appendChild(outer); var glass = outer.firstChild; @@ -164,6 +169,10 @@ //should be prefixed with "__gwt_" function fireOnModuleLoadStart(className) { $sendStats("moduleStartup", "onModuleLoadStart"); +var __gwt_glassMessageZIndex = 2147483647; + +var __gwt_glassMessageZIndex = 2147483647; + } Index: dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html === --- dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html (revision 9607) +++ dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html (working copy) @@ -164,6 +164,9 @@ + 'REFRESH this page.'); } +// Keep track of z-index to allow layering of multiple glass messages +var __gwt_glassMessageZIndex = 2147483647; + // Note this method is also used by ModuleSpace.java function __gwt_displayGlassMessage(summary, details) { var topWin = window.top; @@ -171,11 +174,13 @@ var outer = topDoc.createElement("div"); // Do not insert whitespace or outer.firstChild will get a text node. outer.innerHTML = -'style="position:absolute;z-index:2147483646;left:0px;top:0px;right:0px;bottom:0px;filter:alpha(opacity=75);opacity:0.75;background-color:#00;">' + -'style="position:absolute;z-index:2147483647;left:50px;top:50px;width:600px;color:#FF;font-family:verdana;">' + - '' + summary + '' + - '' + details + '' + -'' +'' + +'' + summary + '' + +'' + details + '' + +'' + +'' ; topDoc.body.appendChild(outer); var glass = outer.firstChild; Index: dev/core/src/com/google/gwt/dev/shell/ModuleSpace.java === --- dev/core/src/com/google/gwt/dev/shell/ModuleSpace.java (revision 9607) +++ dev/core/src/com/google/gwt/dev/shell/ModuleSpace.java (working copy) @@ -611,7 +611,7 @@ String details = "Exception while loading module " + entryPointTypeName + ". See Development Mode for details." + "" + stackTrace -+ ""; ++ ""; invokeNativeVoid("__gwt_displayGlassMessage", null, new Class[]{String.class, String.class}, -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Allows isBoolean() properties to be handled correctly by AutoBeanCodex. (issue1320801)
One nit and one question about redundant getters. http://gwt-code-reviews.appspot.com/1320801/diff/3001/4005 File user/src/com/google/gwt/autobean/rebind/model/JBeanMethod.java (right): http://gwt-code-reviews.appspot.com/1320801/diff/3001/4005#newcode30 user/src/com/google/gwt/autobean/rebind/model/JBeanMethod.java:30: public enum JBeanMethod { Might as well make constants for IS, HAS and GET http://gwt-code-reviews.appspot.com/1320801/diff/3001/4024 File user/src/com/google/gwt/requestfactory/server/ReflectiveServiceLayer.java (right): http://gwt-code-reviews.appspot.com/1320801/diff/3001/4024#newcode74 user/src/com/google/gwt/requestfactory/server/ReflectiveServiceLayer.java:74: Class domainType, String property) { Should we check for redundant methods? (is or has or get, oh my)? Or perhaps the java bean spec has precedence defined? What a stupid, stupid convention this is. http://gwt-code-reviews.appspot.com/1320801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: AbstractPlaceHistoryMapper doesn't process tokens correctly wrt empty prefixes (issue1316801)
Oops, PlaceHistoryGeneratorContextTest is failing: java.lang.NullPointerException at com.google.gwt.place.rebind.PlaceHistoryGeneratorContext.getPrefixForTokenizerType(PlaceHistoryGeneratorContext.java:269) at com.google.gwt.place.rebind.PlaceHistoryGeneratorContext.initTokenizersWithoutGetters(PlaceHistoryGeneratorContext.java:330) at com.google.gwt.place.rebind.PlaceHistoryGeneratorContext.ensureInitialized(PlaceHistoryGeneratorContext.java:189) at com.google.gwt.place.rebind.PlaceHistoryGeneratorContext.getPrefixes(PlaceHistoryGeneratorContext.java:160) at com.google.gwt.place.rebind.PlaceHistoryGeneratorContextTest.testNoFactory(PlaceHistoryGeneratorContextTest.java:141) testWithFactory error in 0.024s java.lang.NullPointerException at com.google.gwt.place.rebind.PlaceHistoryGeneratorContext.getPrefixForTokenizerType(PlaceHistoryGeneratorContext.java:269) at com.google.gwt.place.rebind.PlaceHistoryGeneratorContext.initTokenizersWithoutGetters(PlaceHistoryGeneratorContext.java:330) at com.google.gwt.place.rebind.PlaceHistoryGeneratorContext.ensureInitialized(PlaceHistoryGeneratorContext.java:189) at com.google.gwt.place.rebind.PlaceHistoryGeneratorContext.getPrefixes(PlaceHistoryGeneratorContext.java:160) at com.google.gwt.place.rebind.PlaceHistoryGeneratorContextTest.testWithFactory(PlaceHistoryGeneratorContextTest.java:187) On Mon, Jan 24, 2011 at 5:34 PM, wrote: > LGTM, submitting > > > http://gwt-code-reviews.appspot.com/1316801/show > -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Updates DTRF to show the use of ServiceLocators and Locators. (issue1299801)
LGTM http://gwt-code-reviews.appspot.com/1299801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r9607 committed - Allow Editor framework to handle primitive types....
Revision: 9607 Author: gwt.mirror...@gmail.com Date: Tue Jan 25 08:47:13 2011 Log: Allow Editor framework to handle primitive types. Issue 5864. Patch by: bobv Review by: rjrjr Review at http://gwt-code-reviews.appspot.com/1312802 http://code.google.com/p/google-web-toolkit/source/detail?r=9607 Modified: /trunk/user/src/com/google/gwt/editor/rebind/model/EditorModel.java /trunk/user/test/com/google/gwt/editor/client/Person.java /trunk/user/test/com/google/gwt/editor/client/PersonEditor.java /trunk/user/test/com/google/gwt/editor/client/SimpleBeanEditorTest.java /trunk/user/test/com/google/gwt/editor/rebind/model/EditorModelTest.java === --- /trunk/user/src/com/google/gwt/editor/rebind/model/EditorModel.java Fri Jan 14 08:57:14 2011 +++ /trunk/user/src/com/google/gwt/editor/rebind/model/EditorModel.java Tue Jan 25 08:47:13 2011 @@ -180,6 +180,8 @@ private final TreeLogger logger; + private final TypeOracle oracle; + private final EditorModel parentModel; private boolean poisoned; @@ -212,7 +214,7 @@ die(mustExtendMessage(driverType)); } -TypeOracle oracle = intf.getOracle(); +oracle = intf.getOracle(); editorIntf = oracle.findType(Editor.class.getName()).isGenericType(); assert editorIntf != null : "No Editor type"; isEditorIntf = oracle.findType(IsEditor.class.getName()).isGenericType(); @@ -250,6 +252,7 @@ this.editorSoFar = subEditor; this.isEditorIntf = parent.isEditorIntf; this.leafValueEditorIntf = parent.leafValueEditorIntf; +this.oracle = parent.oracle; this.parentModel = parent; this.proxyType = proxyType; this.typeData = parent.typeData; @@ -467,6 +470,7 @@ if (parts[i].length() == 0) { continue; } + boolean lastPart = i == j - 1; String getterName = camelCase("get", parts[i]); for (JClassType search : lookingAt.getFlattenedSupertypeHierarchy()) { @@ -475,12 +479,19 @@ for (JMethod maybeSetter : search.getOverloads(camelCase("set", parts[i]))) { if (maybeSetter.getReturnType().equals(JPrimitiveType.VOID) -&& maybeSetter.getParameters().length == 1 -&& maybeSetter.getParameters()[0].getType().isClassOrInterface() != null -&& maybeSetter.getParameters()[0].getType().isClassOrInterface().isAssignableFrom( -propertyType)) { - setterName = maybeSetter.getName(); - break; +&& maybeSetter.getParameters().length == 1) { + JType setterParamType = maybeSetter.getParameters()[0].getType(); + // Handle the case of setFoo(int) vs. Editor + if (setterParamType.isPrimitive() != null) { +// Replace the int with Integer +setterParamType = oracle.findType(setterParamType.isPrimitive().getQualifiedBoxedSourceName()); + } + boolean matches = setterParamType.isClassOrInterface().isAssignableFrom( + propertyType); + if (matches) { +setterName = maybeSetter.getName(); +break; + } } } } @@ -489,7 +500,7 @@ if (getter != null) { JType returnType = getter.getReturnType(); lookingAt = returnType.isClassOrInterface(); - if (lookingAt == null) { + if (!lastPart && lookingAt == null) { poison(foundPrimitiveMessage(returnType, interstitialGetters.toString(), path)); return; === --- /trunk/user/test/com/google/gwt/editor/client/Person.java Mon Sep 13 09:30:34 2010 +++ /trunk/user/test/com/google/gwt/editor/client/Person.java Tue Jan 25 08:47:13 2011 @@ -19,13 +19,18 @@ * Simple data object used by multiple tests. */ public class Person { - String name; Address address; Person manager; + String name; + long localTime; public Address getAddress() { return address; } + + public long getLocalTime() { +return localTime; + } public Person getManager() { return manager; @@ -38,6 +43,10 @@ public void setAddress(Address address) { this.address = address; } + + public void setLocalTime(long localTime) { +this.localTime = localTime; + } public void setManager(Person manager) { this.manager = manager; === --- /trunk/user/test/com/google/gwt/editor/client/PersonEditor.java Wed Sep 15 02:26:39 2010 +++ /trunk/user/test/com/google/gwt/editor/client/PersonEditor.java Tue Jan 25 08:47:13 2011 @@ -22,6 +22,7 @@ */ class PersonEditor implements Editor { public AddressEditor addressEditor = new AddressEditor(); + public SimpleEditor localTime = SimpleEditor.of(System.currentTimeMillis()); public SimpleEditor name = SimpleEditor.of(SimpleBeanEditorTest.UNINI
[gwt-contrib] Re: If some unrecoverable failure happens during validation, a ValidationException is raised. (issue1295803)
LGTM On 2011/01/25 14:21:45, Nick Chalko wrote: http://gwt-code-reviews.appspot.com/1295803/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Throw an IllegalErgumentException if the property name is invalid. (issue1287802)
LGTM. With nits. http://gwt-code-reviews.appspot.com/1287802/diff/1/2 File user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java (right): http://gwt-code-reviews.appspot.com/1287802/diff/1/2#newcode91 user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java:91: private static Function PROPERTY_DESCRIPTOR_TO_NAME = new Function() { Line length http://gwt-code-reviews.appspot.com/1287802/diff/1/2#newcode94 user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java:94: return pd.getName(); Indentation http://gwt-code-reviews.appspot.com/1287802/diff/1/2#newcode108 user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java:108: * Indentation got messed up. http://gwt-code-reviews.appspot.com/1287802/diff/1/2#newcode256 user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java:256: // Write the wrappers after we know which is needed is -> are http://gwt-code-reviews.appspot.com/1287802/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r9606 committed - Handle deferred layout updates gracefully in SplitLayoutPanel resize l...
Revision: 9606 Author: fmal...@google.com Date: Tue Jan 25 05:06:56 2011 Log: Handle deferred layout updates gracefully in SplitLayoutPanel resize logic. Resubmitting with fixes for the CellViewSuite test breakage. Review at http://gwt-code-reviews.appspot.com/1295804 Review by: jlaba...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=9606 Modified: /trunk/user/src/com/google/gwt/user/client/ui/SplitLayoutPanel.java === --- /trunk/user/src/com/google/gwt/user/client/ui/SplitLayoutPanel.java Fri Jan 7 05:51:44 2011 +++ /trunk/user/src/com/google/gwt/user/client/ui/SplitLayoutPanel.java Tue Jan 25 05:06:56 2011 @@ -100,6 +100,8 @@ private final boolean reverse; private int minSize; +private double centerSize, syncedCenterSize; + public Splitter(Widget target, boolean reverse) { this.target = target; this.reverse = reverse; @@ -176,7 +178,26 @@ protected abstract int getTargetSize(); +private double getMaxSize() { + // To avoid seeing stale center size values due to deferred layout + // updates, maintain our own copy up to date and resync when the + // DockLayoutPanel value changes. + double newCenterSize = getCenterSize(); + if (syncedCenterSize != newCenterSize) { +syncedCenterSize = newCenterSize; +centerSize = newCenterSize; + } + + return Math.max(((LayoutData) target.getLayoutData()).size + centerSize, +0); +} + private void setAssociatedWidgetSize(double size) { + double maxSize = getMaxSize(); + if (size > maxSize) { +size = maxSize; + } + if (size < minSize) { size = minSize; } @@ -186,12 +207,8 @@ return; } - // Don't grow beyond remaining space - double centerSize = getCenterSize(); - if (size - layout.size > centerSize) { -size = layout.size + centerSize; - } - + // Adjust our view until the deferred layout gets scheduled. + centerSize += layout.size - size; layout.size = size; // Defer actually updating the layout, so that if we receive many -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Updates DTRF to show the use of ServiceLocators and Locators. (issue1299801)
http://gwt-code-reviews.appspot.com/1299801/diff/1/2 File samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/PersonEditor.java (right): http://gwt-code-reviews.appspot.com/1299801/diff/1/2#newcode59 samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/PersonEditor.java:59: public PersonEditor(DynaTableRequestFactory factory) { On 2011/01/21 02:54:31, rjrjr wrote: If we're following the DI pattern, ScheduleEditor should be a constructor arg Done. http://gwt-code-reviews.appspot.com/1299801/diff/1/4 File samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/ScheduleEditor.java (right): http://gwt-code-reviews.appspot.com/1299801/diff/1/4#newcode41 samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/ScheduleEditor.java:41: public ScheduleEditor(DynaTableRequestFactory factory) { On 2011/01/21 02:54:31, rjrjr wrote: timeSlots should be a constructor arg Done. http://gwt-code-reviews.appspot.com/1299801/diff/1/5 File samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/ScheduleEditor.ui.xml (right): http://gwt-code-reviews.appspot.com/1299801/diff/1/5#newcode6 samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/ScheduleEditor.ui.xml:6: /* Add CSS here. See the GWT docs on UI Binder for more details */ On 2011/01/21 02:54:31, rjrjr wrote: This comment is noise, I think. Done. http://gwt-code-reviews.appspot.com/1299801/diff/1/5#newcode7 samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/ScheduleEditor.ui.xml:7: .important { On 2011/01/21 02:54:31, rjrjr wrote: Does anything use this style? Done. http://gwt-code-reviews.appspot.com/1299801/diff/1/7 File samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/TimeSlotListWidget.java (right): http://gwt-code-reviews.appspot.com/1299801/diff/1/7#newcode64 samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/TimeSlotListWidget.java:64: class ScheduleRow { On 2011/01/21 02:54:31, rjrjr wrote: why not private? Done. http://gwt-code-reviews.appspot.com/1299801/diff/1/7#newcode76 samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/TimeSlotListWidget.java:76: for (TimeSlotProxy timeSlot : backing) { On 2011/01/21 02:54:31, rjrjr wrote: This is kind of nasty. Could you make an immutable TimeSlotKey object that implemented this comparison in its equals, and keep a map of TimeSlotKey to TimeSlotProxy? Done. Also kept track of requested TimeSlotProxys to minimize server requests. http://gwt-code-reviews.appspot.com/1299801/diff/1/7#newcode96 samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/TimeSlotListWidget.java:96: context.createTimeSlot(day.ordinal(), hour * 60, hour * 60 + 50).fire(new Receiver() { On 2011/01/21 02:54:31, rjrjr wrote: What happens on redundant request, if the user clicks a few times before the response is received? Done. http://gwt-code-reviews.appspot.com/1299801/diff/1/7#newcode118 samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/TimeSlotListWidget.java:118: SATURDAY("S"); On 2011/01/21 02:54:31, rjrjr wrote: Two character short names would avoid ambiguity Done. Also improved formatting for the hour column. http://gwt-code-reviews.appspot.com/1299801/diff/1/8 File samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/TimeSlotListWidget.ui.xml (right): http://gwt-code-reviews.appspot.com/1299801/diff/1/8#newcode6 samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/TimeSlotListWidget.ui.xml:6: /* Add CSS here. See the GWT docs on UI Binder for more details */ On 2011/01/21 02:54:31, rjrjr wrote: ditto Done. http://gwt-code-reviews.appspot.com/1299801/diff/1/8#newcode7 samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/TimeSlotListWidget.ui.xml:7: .important { On 2011/01/21 02:54:31, rjrjr wrote: ditto Done. http://gwt-code-reviews.appspot.com/1299801/diff/1/9 File samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/domain/Person.java (right): http://gwt-code-reviews.appspot.com/1299801/diff/1/9#newcode154 samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/domain/Person.java:154: * to supply methods required by RequestFactory. On 2011/01/21 02:54:31, rjrjr wrote: This comment was screaming out "delete me!" If the persist method is no longer used, just kill it. If it is still used, please get rid of the "When this was written..." stuff, nobody cares about our history. And the "See...to supply methods required..." stuff won't make sense here since this method is not a requirement. Done. http://gwt-code-reviews.appspot.com/1299801/diff/1/10 File samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/domain/Schedule.java (right): http://gwt-code-reviews.appspot.com/1299801/diff/1/10#newcode25 samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/domain/Schedule.java:
[gwt-contrib] Re: Updates DTRF to show the use of ServiceLocators and Locators. (issue1299801)
http://gwt-code-reviews.appspot.com/1299801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r9605 committed - Update MissingPlugin.html for FF4 support...
Revision: 9605 Author: con...@google.com Date: Tue Jan 25 04:39:49 2011 Log: Update MissingPlugin.html for FF4 support Review at http://gwt-code-reviews.appspot.com/1322802 http://code.google.com/p/google-web-toolkit/source/detail?r=9605 Modified: /trunk/plugins/MissingPlugin/war/MissingPlugin.html === --- /trunk/plugins/MissingPlugin/war/MissingPlugin.html Thu Dec 23 13:01:51 2010 +++ /trunk/plugins/MissingPlugin/war/MissingPlugin.html Tue Jan 25 04:39:49 2011 @@ -35,7 +35,7 @@ "firefox-old" : { -"caption" : "Sorry, the GWT Developer Plugin only supports Firefox 3.0 and 3.5 at present", +"caption" : "Sorry, the GWT Developer Plugin only supports Firefox 3.0 - 4.0 at present", "url" : "http://www.getfirefox.com";, "supported" : false }, @@ -81,7 +81,7 @@ { "caption" : "Download the GWT Developer PluginFor Firefox", "url" : "https://dl-ssl.google.com/gwt/plugins/firefox/gwt-dev-plugin.xpi";, -"platforms" : "Win x86, Linux x86/x86_64, Mac x86/PPC", +"platforms" : "Win x86, Linux x86/x86_64, Mac x86/PPC(3.x only)/x86_64 (4.x) only", "supported" : true }, @@ -130,7 +130,8 @@ } else if (ua.indexOf("opera") != -1) { id = 'opera'; } else if (ua.indexOf("gecko") != -1) { -if (ua.indexOf("rv:1.9") != -1) { + if (ua.indexOf("rv:1.9") != -1 || + ua.indexOf("rv:2.0") != -1) { id = 'firefox'; } else { id = 'firefox-old'; -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Remove experimental warning from Canvas and clean up javadoc. (issue1286802)
Reviewers: rjrjr, Description: Remove experimental warning from Canvas and clean up javadoc. Please review this at http://gwt-code-reviews.appspot.com/1286802/show Affected files: M user/src/com/google/gwt/canvas/client/Canvas.java M user/src/com/google/gwt/canvas/dom/client/CanvasGradient.java M user/src/com/google/gwt/canvas/dom/client/CanvasPattern.java M user/src/com/google/gwt/canvas/dom/client/CanvasPixelArray.java M user/src/com/google/gwt/canvas/dom/client/Context.java M user/src/com/google/gwt/canvas/dom/client/Context2d.java M user/src/com/google/gwt/canvas/dom/client/CssColor.java M user/src/com/google/gwt/canvas/dom/client/FillStrokeStyle.java M user/src/com/google/gwt/canvas/dom/client/ImageData.java M user/src/com/google/gwt/canvas/dom/client/TextMetrics.java M user/src/com/google/gwt/dom/client/CanvasElement.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Handle deferred layout updates gracefully in SplitLayoutPanel resize logic. (issue1295804)
LGTM http://gwt-code-reviews.appspot.com/1295804/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Handle deferred layout updates gracefully in SplitLayoutPanel resize logic. (issue1295804)
Reviewers: jlabanca, Description: Handle deferred layout updates gracefully in SplitLayoutPanel resize logic. Resubmitting with fixes for the CellViewSuite test breakage. Please review this at http://gwt-code-reviews.appspot.com/1295804/show Affected files: M user/src/com/google/gwt/user/client/ui/SplitLayoutPanel.java Index: user/src/com/google/gwt/user/client/ui/SplitLayoutPanel.java === --- user/src/com/google/gwt/user/client/ui/SplitLayoutPanel.java (revision 9599) +++ user/src/com/google/gwt/user/client/ui/SplitLayoutPanel.java (working copy) @@ -99,6 +99,8 @@ private final boolean reverse; private int minSize; + +private double centerSize, syncedCenterSize; public Splitter(Widget target, boolean reverse) { this.target = target; @@ -176,7 +178,26 @@ protected abstract int getTargetSize(); +private double getMaxSize() { + // To avoid seeing stale center size values due to deferred layout + // updates, maintain our own copy up to date and resync when the + // DockLayoutPanel value changes. + double newCenterSize = getCenterSize(); + if (syncedCenterSize != newCenterSize) { +syncedCenterSize = newCenterSize; +centerSize = newCenterSize; + } + + return Math.max(((LayoutData) target.getLayoutData()).size + centerSize, +0); +} + private void setAssociatedWidgetSize(double size) { + double maxSize = getMaxSize(); + if (size > maxSize) { +size = maxSize; + } + if (size < minSize) { size = minSize; } @@ -186,12 +207,8 @@ return; } - // Don't grow beyond remaining space - double centerSize = getCenterSize(); - if (size - layout.size > centerSize) { -size = layout.size + centerSize; - } - + // Adjust our view until the deferred layout gets scheduled. + centerSize += layout.size - size; layout.size = size; // Defer actually updating the layout, so that if we receive many -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Allows isBoolean() properties to be handled correctly by AutoBeanCodex. (issue1320801)
Ready for another look. The moves in the autobean.server package don't have any interesting diffs except to change visibilities. http://gwt-code-reviews.appspot.com/1320801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] If some unrecoverable failure happens during validation, a ValidationException is raised. (issue1295803)
Reviewers: rchandia, Description: If some unrecoverable failure happens during validation, a ValidationException is raised. [JSR 303 TCK Result] 66 of 257 (25.68%) Pass with 25 Failures and 3 Errors. Please review this at http://gwt-code-reviews.appspot.com/1295803/show Affected files: M user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java M user/test/org/hibernate/jsr303/tck/tests/validation/ValidatePropertyGwtTest.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Change GWT History to work when multiple applications are loaded within the same page. (issue1322801)
On 2011/01/25 00:24:52, jhollenbach wrote: LGTM http://gwt-code-reviews.appspot.com/1322801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors