[gwt-contrib] Re: Adding CellPreviewEvents to Cell Widgets to preview all events that are fired to Cells. This all... (issue1126801)
committed as r9274 http://gwt-code-reviews.appspot.com/1126801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add support for RpcTokens, which, if set, are sent with each RPCRequest to (issue1107801)
http://gwt-code-reviews.appspot.com/1107801/diff/3001/4005 File user/src/com/google/gwt/user/client/rpc/ServiceDefTarget.java (right): http://gwt-code-reviews.appspot.com/1107801/diff/3001/4005#newcode43 user/src/com/google/gwt/user/client/rpc/ServiceDefTarget.java:43: RpcToken getRpcToken(); Ok, how about extracting the new methods into an interface HasRpcToken. It shouldn't be much of a burden on calling code anyway. http://gwt-code-reviews.appspot.com/1107801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add support for RpcTokens, which, if set, are sent with each RPCRequest to (issue1107801)
http://gwt-code-reviews.appspot.com/1107801/diff/3001/4005 File user/src/com/google/gwt/user/client/rpc/ServiceDefTarget.java (right): http://gwt-code-reviews.appspot.com/1107801/diff/3001/4005#newcode43 user/src/com/google/gwt/user/client/rpc/ServiceDefTarget.java:43: RpcToken getRpcToken(); On 2010/11/22 19:33:42, jat wrote: On 2010/11/22 03:52:05, meder wrote: > On 2010/11/20 04:33:44, xtof wrote: > > How likely is it that developers will be providing their own implementations > of > > ServiceDefTarget? We'd be breaking them by adding methods here. > > I've seen it being done, so this will most definitely break some code. I'm > waiting for someone from GWT team to look at this and tell me if this is fine or > if I should add another interface. Do you have any reference to non-generated code that implements ServiceDefTarget? I would expect only mocks would do so. It's mostly mocks but not all: http://codesearch.google.com/codesearch?hl=en&lr=&q=%22implements+ServiceDefTarget%22+lang:java&sbtn=Search That said, it wouldn't be much of a problem to put the RpcToken APIs on another interface. Either way is fine with me. http://gwt-code-reviews.appspot.com/1107801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Public: Handle fields marked @Valid (issue1142801)
Reviewers: rchandia, Description: Public: Handle fields marked @Valid Please review this at http://gwt-code-reviews.appspot.com/1142801/show Affected files: A samples/validation/src/com/google/gwt/sample/validation/shared/Address.java M samples/validation/src/com/google/gwt/sample/validation/shared/Person.java M samples/validationtck/src/org/hibernate/jsr303/tck/Jsr303Tck.gwt.xml M user/src/com/google/gwt/validation/client/impl/ConstraintDescriptorImpl.java M user/src/com/google/gwt/validation/client/impl/ConstraintViolationImpl.java M user/src/com/google/gwt/validation/rebind/AbstractCreator.java M user/src/com/google/gwt/validation/rebind/BeanHelper.java M user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java M user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorGenerator.java M user/src/com/google/gwt/validation/rebind/ValidatorCreator.java M user/src/com/google/gwt/validation/rebind/ValidatorGenerator.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fixing a few bugs in Cell widgets. (issue1141801)
LGTM http://gwt-code-reviews.appspot.com/1141801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r9272 committed - Add a test for issue 5134 to ensure that RequestFactory interfaces can...
Revision: 9272 Author: b...@google.com Date: Mon Nov 22 11:42:05 2010 Log: Add a test for issue 5134 to ensure that RequestFactory interfaces can be extended. Patch by: bobv Review by: rchandia Reported by: pjulien Review at http://gwt-code-reviews.appspot.com/1138801 http://code.google.com/p/google-web-toolkit/source/detail?r=9272 Added: /trunk/user/test/com/google/gwt/requestfactory/shared/BasicRequestFactory.java Modified: /trunk/user/test/com/google/gwt/requestfactory/shared/SimpleRequestFactory.java === --- /dev/null +++ /trunk/user/test/com/google/gwt/requestfactory/shared/BasicRequestFactory.java Mon Nov 22 11:42:05 2010 @@ -0,0 +1,27 @@ +/* + * 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.requestfactory.shared; + +/** + * A base type for {...@link SimpleRequestFactory} to ensure that extending + * RequestFactory interfaces works correctly. + */ +public interface BasicRequestFactory extends RequestFactory { + + LoggingRequest loggingRequest(); + + UserInformationRequest userInformationRequest(); +} === --- /trunk/user/test/com/google/gwt/requestfactory/shared/SimpleRequestFactory.java Thu Nov 18 20:07:43 2010 +++ /trunk/user/test/com/google/gwt/requestfactory/shared/SimpleRequestFactory.java Mon Nov 22 11:42:05 2010 @@ -19,13 +19,9 @@ * Simple RequesetFactory interface with two domain objects, and our standard * UserInformation and Logging services. */ -public interface SimpleRequestFactory extends RequestFactory { - - LoggingRequest loggingRequest(); +public interface SimpleRequestFactory extends BasicRequestFactory { SimpleBarRequest simpleBarRequest(); - - SimpleFooRequest simpleFooRequest(); - - UserInformationRequest userInformationRequest(); -} + + SimpleFooRequest simpleFooRequest(); +} -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Bidi support for ListBox (issue1137801)
LGTM http://gwt-code-reviews.appspot.com/1137801/diff/1/3 File user/test/com/google/gwt/user/client/ui/ListBoxTest.java (right): http://gwt-code-reviews.appspot.com/1137801/diff/1/3#newcode117 user/test/com/google/gwt/user/client/ui/ListBoxTest.java:117: extra spaces http://gwt-code-reviews.appspot.com/1137801/diff/1/3#newcode129 user/test/com/google/gwt/user/client/ui/ListBoxTest.java:129: assertEquals(LTR_TEXT, lb.getItemText(1)); Is there a way to verify that the RTL text is in RTL and the LTR text in in LTR? If there isn't a reliable way, you can submit anyway. http://gwt-code-reviews.appspot.com/1137801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r9271 committed - Rework the way OperationMessages are processed to allow all domain obj...
Revision: 9271 Author: gwt.mirror...@gmail.com Date: Mon Nov 22 14:41:45 2010 Log: Rework the way OperationMessages are processed to allow all domain objects to be loaded at once. http://code.google.com/p/google-web-toolkit/wiki/RequestFactory_2_1_1 Patch by: bobv Review by: rchandia,rjrjr Review at http://gwt-code-reviews.appspot.com/1135801 http://code.google.com/p/google-web-toolkit/source/detail?r=9271 Modified: /trunk/user/src/com/google/gwt/requestfactory/server/ReflectiveServiceLayer.java /trunk/user/src/com/google/gwt/requestfactory/server/RequestState.java /trunk/user/src/com/google/gwt/requestfactory/server/ServiceLayer.java /trunk/user/src/com/google/gwt/requestfactory/server/ServiceLayerDecorator.java /trunk/user/src/com/google/gwt/requestfactory/server/SimpleRequestProcessor.java === --- /trunk/user/src/com/google/gwt/requestfactory/server/ReflectiveServiceLayer.java Mon Nov 22 08:01:19 2010 +++ /trunk/user/src/com/google/gwt/requestfactory/server/ReflectiveServiceLayer.java Mon Nov 22 14:41:45 2010 @@ -26,7 +26,10 @@ import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.lang.reflect.Type; +import java.util.ArrayList; import java.util.Collections; +import java.util.Iterator; +import java.util.List; import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; @@ -186,6 +189,23 @@ } return clazz.cast(getTop().invoke(getFind(clazz), id)); } + + @Override + public List loadDomainObjects(List> classes, + List domainIds) { +if (classes.size() != domainIds.size()) { + die(null, + "Size mismatch in paramaters. classes.size() = %d domainIds.size=%d", + classes.size(), domainIds.size()); +} +List toReturn = new ArrayList(classes.size()); +Iterator> classIt = classes.iterator(); +Iterator idIt = domainIds.iterator(); +while (classIt.hasNext()) { + toReturn.add(getTop().loadDomainObject(classIt.next(), idIt.next())); +} +return toReturn; + } @Override public void setProperty(Object domainObject, String property, === --- /trunk/user/src/com/google/gwt/requestfactory/server/RequestState.java Mon Nov 22 08:01:19 2010 +++ /trunk/user/src/com/google/gwt/requestfactory/server/RequestState.java Mon Nov 22 14:41:45 2010 @@ -33,8 +33,11 @@ import com.google.gwt.requestfactory.shared.messages.IdMessage; import com.google.gwt.requestfactory.shared.messages.IdMessage.Strength; +import java.util.ArrayList; import java.util.Collections; import java.util.IdentityHashMap; +import java.util.Iterator; +import java.util.List; import java.util.Map; /** @@ -83,6 +86,9 @@ resolver = new Resolver(this); } + /** + * Turn a domain value into a wire format message. + */ public Splittable flatten(Object domainValue) { Splittable flatValue; if (ValueCodex.canDecode(domainValue.getClass())) { @@ -93,27 +99,15 @@ return flatValue; } - public AutoBean getBeanForPayload(IdMessage idMessage) { -SimpleProxyId id; -if (Strength.SYNTHETIC.equals(idMessage.getStrength())) { - @SuppressWarnings("unchecked") - Class clazz = (Class) service.resolveClass(idMessage.getTypeToken()); - id = idFactory.allocateSyntheticId(clazz, idMessage.getSyntheticId()); -} else { - String decodedId = idMessage.getServerId() == null ? null - : SimpleRequestProcessor.fromBase64(idMessage.getServerId()); - id = idFactory.getId(idMessage.getTypeToken(), decodedId, - idMessage.getClientId()); -} -return getBeanForPayload(id); - } - + /** + * Get or create a BaseProxy AutoBean for the given id. + */ public AutoBean getBeanForPayload( SimpleProxyId id, Object domainObject) { @SuppressWarnings("unchecked") AutoBean toReturn = (AutoBean) beans.get(id); if (toReturn == null) { - toReturn = createEntityProxyBean(id, domainObject); + toReturn = createProxyBean(id, domainObject); } return toReturn; } @@ -125,7 +119,33 @@ Splittable serializedProxyId) { IdMessage idMessage = AutoBeanCodex.decode(MessageFactoryHolder.FACTORY, IdMessage.class, serializedProxyId).as(); -return getBeanForPayload(idMessage); +@SuppressWarnings("unchecked") +AutoBean toReturn = (AutoBean) getBeansForPayload( +Collections.singletonList(idMessage)).get(0); +return toReturn; + } + + /** + * Get or create BaseProxy AutoBeans for a list of id-bearing messages. + */ + public List> getBeansForPayload( + List idMessages) { +List> ids = new ArrayList>( +idMessages.size()); +for (IdMessage idMessage : idMessages) { + SimpleProxyId id; + if (Strength.SYNTHETIC.equals(idMessage.getStrength())) { +Class clazz = service.resolveClass(idMessage.getTypeToken()); +id = idFactory.allocateSynthet
[gwt-contrib] Re: Adding CellPreviewEvents to Cell Widgets to preview all events that are fired to Cells. This all... (issue1126801)
http://gwt-code-reviews.appspot.com/1126801/diff/2002/6002 File samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/CwCellTable.java (right): http://gwt-code-reviews.appspot.com/1126801/diff/2002/6002#newcode178 samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/CwCellTable.java:178: cellTable.addColumn(checkColumn, SafeHtmlUtils.fromSafeConstant("")); On 2010/11/22 21:58:24, pdr wrote: This wasn't added in this patch, but should this be "" to be valid xhtml? Done. http://gwt-code-reviews.appspot.com/1126801/diff/2002/6003 File user/src/com/google/gwt/cell/client/CheckboxCell.java (right): http://gwt-code-reviews.appspot.com/1126801/diff/2002/6003#newcode67 user/src/com/google/gwt/cell/client/CheckboxCell.java:67: * @param handlesSelection true if the cell modifies the selection satte On 2010/11/22 21:58:24, pdr wrote: typo: satte -> state Done. http://gwt-code-reviews.appspot.com/1126801/diff/2002/6004 File user/src/com/google/gwt/user/cellview/client/AbstractHasData.java (right): http://gwt-code-reviews.appspot.com/1126801/diff/2002/6004#newcode395 user/src/com/google/gwt/user/cellview/client/AbstractHasData.java:395: public T getVisibleItem(int indexOnPage) { The javadoc is inherited from HasData. We only need to javadoc getVisibleItems() because it returns an immutable list, which is not specified in the interface. http://gwt-code-reviews.appspot.com/1126801/diff/2002/6016 File user/test/com/google/gwt/cell/client/CheckboxCellTest.java (right): http://gwt-code-reviews.appspot.com/1126801/diff/2002/6016#newcode49 user/test/com/google/gwt/cell/client/CheckboxCellTest.java:49: } To scope "cell" so I don't have to worry about accidentally referencing the wrong one. http://gwt-code-reviews.appspot.com/1126801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add a test for issue 5134 to ensure that RequestFactory interfaces can be extended. (issue1138801)
LGTM http://gwt-code-reviews.appspot.com/1138801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r9270 committed - Fix covariant return types for methods declared in domain objects....
Revision: 9270 Author: gwt.mirror...@gmail.com Date: Mon Nov 22 11:18:02 2010 Log: Fix covariant return types for methods declared in domain objects. Issue 5512. Patch by: bobv Review by: rchandia Review at http://gwt-code-reviews.appspot.com/1136801 http://code.google.com/p/google-web-toolkit/source/detail?r=9270 Added: /trunk/user/test/com/google/gwt/requestfactory/server/HasId.java Modified: /trunk/user/src/com/google/gwt/requestfactory/server/RequestFactoryInterfaceValidator.java /trunk/user/test/com/google/gwt/requestfactory/server/SimpleBar.java === --- /dev/null +++ /trunk/user/test/com/google/gwt/requestfactory/server/HasId.java Mon Nov 22 11:18:02 2010 @@ -0,0 +1,25 @@ +/* + * 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.requestfactory.server; + +/** + * Used to test covariant return types. + */ +public interface HasId { + Object getId(); + + Object persistAndReturnSelf(); +} === --- /trunk/user/src/com/google/gwt/requestfactory/server/RequestFactoryInterfaceValidator.java Mon Nov 22 08:01:19 2010 +++ /trunk/user/src/com/google/gwt/requestfactory/server/RequestFactoryInterfaceValidator.java Mon Nov 22 11:18:02 2010 @@ -324,7 +324,23 @@ public Set exec(String internalName) { RequestFactoryInterfaceValidator.this.visit(logger, internalName, this); - return methods; + + Map toReturn = new HashMap(); + // Return most-derived methods + for (RFMethod method : methods) { +RFMethod key = new RFMethod(method.getName(), Type.getMethodDescriptor( +Type.VOID_TYPE, method.getArgumentTypes())); + +RFMethod compareTo = toReturn.get(key); +if (compareTo == null) { + toReturn.put(key, method); +} else if (isAssignable(logger, compareTo.getReturnType(), +method.getReturnType())) { + toReturn.put(key, method); +} + } + + return new HashSet(toReturn.values()); } @Override @@ -856,6 +872,7 @@ clientToDomainType.put(clientType, domainType); if (isAssignable(logger, baseProxyIntf, clientType)) { + maybeCheckProxyType(logger, clientType); List list = domainToClientType.get(domainType); if (list == null) { list = new ArrayList(); === --- /trunk/user/test/com/google/gwt/requestfactory/server/SimpleBar.java Thu Nov 18 13:15:58 2010 +++ /trunk/user/test/com/google/gwt/requestfactory/server/SimpleBar.java Mon Nov 22 11:18:02 2010 @@ -28,7 +28,7 @@ /** * Domain object for SimpleFooRequest. */ -public class SimpleBar { +public class SimpleBar implements HasId { /** * DO NOT USE THIS UGLY HACK DIRECTLY! Call {...@link #get} instead. */ @@ -88,7 +88,7 @@ public static SimpleBar getSingleton() { return findSimpleBar("1L"); } - + public static void reset() { resetImpl(); } -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Fixing a few bugs in Cell widgets. (issue1141801)
Reviewers: rchandia, Description: Fixing a few bugs in Cell widgets. Issue 5625: Fixes a bug in CellBrowser where the first item in each list is not clickable because we are too optimistic about not reselecting a row that is already selected. Now we will reselect a row if the row index changed OR if there is no row value selected, which ensures that the 0th row can be selected. Issue 5632: Fixes a bug where you have to click an EditTextCell twice to switch it to edit mode. The bug is actually that we are stealing focus away from the cell even though it is in edit mode. Fixes an NPE in EditTextCell when ValueUpdater is null. Fixes a bug in CellList where the key is not passed to Cell#render(). Please review this at http://gwt-code-reviews.appspot.com/1141801/show Affected files: M user/src/com/google/gwt/cell/client/EditTextCell.java M user/src/com/google/gwt/user/cellview/client/CellBrowser.java M user/src/com/google/gwt/user/cellview/client/CellList.java M user/src/com/google/gwt/user/cellview/client/CellTable.java M user/src/com/google/gwt/user/cellview/client/CellTreeNodeView.java M user/src/com/google/gwt/user/cellview/client/HasDataPresenter.java M user/test/com/google/gwt/user/cellview/client/CellListTest.java M user/test/com/google/gwt/user/cellview/client/HasDataPresenterTest.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fixes two DevMode issues: (issue1140801)
http://gwt-code-reviews.appspot.com/1140801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Enum Ordinalization Optimization (revised) (issue1133801)
http://gwt-code-reviews.appspot.com/1133801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Rework the way OperationMessages are processed to allow all domain objects to be loaded at once. (issue1135801)
LGTM http://gwt-code-reviews.appspot.com/1135801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Adding CellPreviewEvents to Cell Widgets to preview all events that are fired to Cells. This all... (issue1126801)
LGTM Tested and everything works well. http://gwt-code-reviews.appspot.com/1126801/diff/2002/6002 File samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/CwCellTable.java (right): http://gwt-code-reviews.appspot.com/1126801/diff/2002/6002#newcode178 samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/CwCellTable.java:178: cellTable.addColumn(checkColumn, SafeHtmlUtils.fromSafeConstant("")); This wasn't added in this patch, but should this be "" to be valid xhtml? http://gwt-code-reviews.appspot.com/1126801/diff/2002/6003 File user/src/com/google/gwt/cell/client/CheckboxCell.java (right): http://gwt-code-reviews.appspot.com/1126801/diff/2002/6003#newcode67 user/src/com/google/gwt/cell/client/CheckboxCell.java:67: * @param handlesSelection true if the cell modifies the selection satte typo: satte -> state http://gwt-code-reviews.appspot.com/1126801/diff/2002/6004 File user/src/com/google/gwt/user/cellview/client/AbstractHasData.java (right): http://gwt-code-reviews.appspot.com/1126801/diff/2002/6004#newcode395 user/src/com/google/gwt/user/cellview/client/AbstractHasData.java:395: public T getVisibleItem(int indexOnPage) { Javadoc http://gwt-code-reviews.appspot.com/1126801/diff/2002/6016 File user/test/com/google/gwt/cell/client/CheckboxCellTest.java (right): http://gwt-code-reviews.appspot.com/1126801/diff/2002/6016#newcode49 user/test/com/google/gwt/cell/client/CheckboxCellTest.java:49: } Why are these wrapped in their own blocks? http://gwt-code-reviews.appspot.com/1126801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Fixes two DevMode issues: (issue1140801)
Reviewers: scottb, Description: Fixes two DevMode issues: 1 - Generic SingleImplJso interfaces are now mapped by their JGenericType in TypeOracle instead of their JParameterizedType since lookups in DevMode will use the generic type. 2 - Fixes a bug in CompilingClassLoader where SingleImplJso interfaces would have their methods mapped to the left JSO impl and not the actual declaring type for the method. Review by: sco...@google.com Please review this at http://gwt-code-reviews.appspot.com/1140801/show Affected files: M dev/core/src/com/google/gwt/core/ext/typeinfo/JAbstractMethod.java M dev/core/src/com/google/gwt/core/ext/typeinfo/TypeOracle.java M dev/core/src/com/google/gwt/dev/shell/CompilingClassLoader.java Index: dev/core/src/com/google/gwt/core/ext/typeinfo/JAbstractMethod.java === --- dev/core/src/com/google/gwt/core/ext/typeinfo/JAbstractMethod.java (revision 9262) +++ dev/core/src/com/google/gwt/core/ext/typeinfo/JAbstractMethod.java (working copy) @@ -113,6 +113,14 @@ public JType[] getThrows() { return thrownTypes.toArray(TypeOracle.NO_JTYPES); } + + public JType[] getParameterTypes() { +final JType[] paramTypes = new JType[params.size()]; +for (int i = 0; i < paramTypes.length; ++i) { + paramTypes[i] = params.get(i).getType(); +} +return paramTypes; + } public JTypeParameter[] getTypeParameters() { return typeParams.toArray(new JTypeParameter[typeParams.size()]); Index: dev/core/src/com/google/gwt/core/ext/typeinfo/TypeOracle.java === --- dev/core/src/com/google/gwt/core/ext/typeinfo/TypeOracle.java (revision 9262) +++ dev/core/src/com/google/gwt/core/ext/typeinfo/TypeOracle.java (working copy) @@ -716,6 +716,12 @@ } for (JClassType intf : JClassType.getFlattenedSuperTypeHierarchy(type)) { +// If intf refers to a JParameterizedType, we need to use its generic +// base type instead. +if (intf instanceof JParameterizedType) { + intf = ((JParameterizedType)intf).getBaseType(); +} + if (intf.isInterface() == null) { // Not an interface continue; Index: dev/core/src/com/google/gwt/dev/shell/CompilingClassLoader.java === --- dev/core/src/com/google/gwt/dev/shell/CompilingClassLoader.java (revision 9262) +++ dev/core/src/com/google/gwt/dev/shell/CompilingClassLoader.java (working copy) @@ -361,7 +361,7 @@ private class MyInstanceMethodOracle implements InstanceMethodOracle { private final Map> signatureToDeclaringClasses = new HashMap>(); - + public MyInstanceMethodOracle(Set jsoTypes, JClassType javaLangObject, SingleJsoImplData jsoData) { @@ -387,7 +387,11 @@ JClassType intf = typeOracle.findType(Name.InternalName.toSourceName(intfName)); JClassType jso = typeOracle.getSingleJsoImpl(intf); for (JMethod method : intf.getMethods()) { - add(jso, method); + JClassType implementingJso = findImplementingTypeForMethod(jso, + method.getName(), method.getParameterTypes()); + assert implementingJso != null +: "Jso should contain method: " + method.getJsniSignature(); + add(implementingJso, method); } } @@ -790,6 +794,14 @@ } } + private static JClassType findImplementingTypeForMethod(JClassType type, String name, JType[] params) { +if (type == null) { + return null; +} +JMethod method = type.findMethod(name, params); +return method != null ? type : findImplementingTypeForMethod(type.getSuperclass(), name, params); + } + private static byte[] getClassBytesFromStream(InputStream is) throws IOException { try { -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Making Column implement HasAlignment so users can specify the default alignment of cells in a co... (issue1134801)
committed as r9269 http://gwt-code-reviews.appspot.com/1134801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r9269 committed - Making Column implement HasAlignment so users can specify the default ...
Revision: 9269 Author: jlaba...@google.com Date: Mon Nov 22 10:20:59 2010 Log: Making Column implement HasAlignment so users can specify the default alignment of cells in a column. In the future, we may add a way to specify the alignment of specific Cells. Issue: 5623 Review at http://gwt-code-reviews.appspot.com/1134801 Review by: rchan...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=9269 Modified: /trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/CwCellSampler.java /trunk/tools/api-checker/config/gwt21_22userApi.conf /trunk/user/src/com/google/gwt/user/cellview/client/CellTable.java /trunk/user/src/com/google/gwt/user/cellview/client/Column.java /trunk/user/test/com/google/gwt/user/cellview/client/CellTableTest.java === --- /trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/CwCellSampler.java Thu Sep 16 10:06:06 2010 +++ /trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/CwCellSampler.java Mon Nov 22 10:20:59 2010 @@ -53,6 +53,7 @@ import com.google.gwt.user.client.Window; import com.google.gwt.user.client.rpc.AsyncCallback; import com.google.gwt.user.client.ui.Button; +import com.google.gwt.user.client.ui.HasHorizontalAlignment; import com.google.gwt.user.client.ui.Widget; import java.util.ArrayList; @@ -268,8 +269,8 @@ pendingChanges.add(new CategoryChange(object, categories[0])); } else { // If not a relative, use the Contacts Category. - pendingChanges.add( - new CategoryChange(object, categories[categories.length - 1])); + pendingChanges.add(new CategoryChange(object, + categories[categories.length - 1])); } } }); @@ -315,8 +316,8 @@ }); // ActionCell. -addColumn(new ActionCell( -"Click Me", new ActionCell.Delegate() { +addColumn(new ActionCell("Click Me", +new ActionCell.Delegate() { public void execute(ContactInfo contact) { Window.alert("You clicked " + contact.getFullName()); } @@ -338,8 +339,7 @@ }); // DateCell. -DateTimeFormat dateFormat = DateTimeFormat.getFormat( -PredefinedFormat.DATE_MEDIUM); +DateTimeFormat dateFormat = DateTimeFormat.getFormat(PredefinedFormat.DATE_MEDIUM); addColumn(new DateCell(dateFormat), "Date", new GetValue() { public Date getValue(ContactInfo contact) { return contact.getBirthday(); @@ -347,8 +347,8 @@ }, null); // DatePickerCell. -addColumn( -new DatePickerCell(dateFormat), "DatePicker", new GetValue() { +addColumn(new DatePickerCell(dateFormat), "DatePicker", +new GetValue() { public Date getValue(ContactInfo contact) { return contact.getBirthday(); } @@ -359,29 +359,29 @@ }); // NumberCell. -addColumn(new NumberCell(), "Number", new GetValue() { - @SuppressWarnings("deprecation") - public Number getValue(ContactInfo contact) { -Date today = new Date(); -Date birthday = contact.getBirthday(); -int age = today.getYear() - birthday.getYear(); -if (today.getMonth() > birthday.getMonth() -|| (today.getMonth() == birthday.getMonth() -&& today.getDate() > birthday.getDate())) { - age--; -} -return age; - } -}, null); - -// IconCellDecorator. -addColumn( -new IconCellDecorator(images.contactsGroup(), new TextCell()), -"Icon", new GetValue() { - public String getValue(ContactInfo contact) { -return contact.getCategory().getDisplayName(); +Column numberColumn = addColumn(new NumberCell(), +"Number", new GetValue() { + @SuppressWarnings("deprecation") + public Number getValue(ContactInfo contact) { +Date today = new Date(); +Date birthday = contact.getBirthday(); +int age = today.getYear() - birthday.getYear(); +if (today.getMonth() > birthday.getMonth() +|| (today.getMonth() == birthday.getMonth() && today.getDate() > birthday.getDate())) { + age--; +} +return age; } }, null); + numberColumn.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LOCALE_END); + +// IconCellDecorator. +addColumn(new IconCellDecorator(images.contactsGroup(), +new TextCell()), "Icon", new GetValue() { + public String getValue(ContactInfo contact) { +return contact.getCategory().getDisplayName(); + } +}, null); // ImageCell. addColumn(new ImageCell(), "Image", new GetValue() { @@ -459,7 +459,7 @@ * @param getter the value getter for the cell */ @ShowcaseSource - private void addColumn(Cell cell, String headerText, + private Column addColumn(C
[gwt-contrib] Re: Comment on TroubleshootingOOPHM in google-web-toolkit
Comment by sombr...@gmail.com: FYI using firefox 3.5.2 from slackware64 13.0 will get thing working. But firebug is gone... For more information: http://code.google.com/p/google-web-toolkit/wiki/TroubleshootingOOPHM -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fix covariant return types for methods declared in domain objects. (issue1136801)
LGTM http://gwt-code-reviews.appspot.com/1136801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Enum Ordinalization Optimization (revised) (issue1133801)
Ray, Good question, but yeah, that case will be handled too. Leaf types don't get visited for arrays at all (thus the root cause of this problem). I have added another test case with the Enum[][] reference, I'll commit that and add to the patch shortly. Jason On Mon, Nov 22, 2010 at 3:15 PM, wrote: > > http://gwt-code-reviews.appspot.com/1133801/diff/1/5 > File dev/core/src/com/google/gwt/dev/jjs/impl/EnumOrdinalizer.java > (right): > > http://gwt-code-reviews.appspot.com/1133801/diff/1/5#newcode650 > dev/core/src/com/google/gwt/dev/jjs/impl/EnumOrdinalizer.java:650: JType > leafType = aType.getLeafType(); > Does this handle Enum[][]? I'm forgot how the type remapper works, but > will it visit the innermost Enum[] separately? > > http://gwt-code-reviews.appspot.com/1133801/show > -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Reduces the size of the soyc report by combining many s (issue1139801)
Reviewers: kathrin, Description: Reduces the size of the soyc report by combining many s mall files into larger files. Reduces the number of files generated by the report by up to a factor of 10 if you are using split points. - Split Point Status reports are now one page per permutation - Leftovers Status reports are now one page per permutation - Class breakdown by package is now one page per {split point, permutation} tuple. For the class breakdown, I also eliminated reporting on packages that have no generated code. Please review this at http://gwt-code-reviews.appspot.com/1139801/show Affected files: M dev/core/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java M dev/core/src/com/google/gwt/soyc/resources/soyc.css -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Comment on TroubleshootingOOPHM in google-web-toolkit
Comment by sombr...@gmail.com: also, add a flag on configs to enable debug for plugin would be good. For more information: http://code.google.com/p/google-web-toolkit/wiki/TroubleshootingOOPHM -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Comment on TroubleshootingOOPHM in google-web-toolkit
Comment by sombr...@gmail.com: please dudes do something about linux 64 bits and firefox 3.6. It's quite annoying. i'm on slackware64 13.1 and firefox 3.6.12, and plugin asks to get installed again and again and again. For more information: http://code.google.com/p/google-web-toolkit/wiki/TroubleshootingOOPHM -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r9268 committed - Public: Only process requested groups....
Revision: 9268 Author: gwt.mirror...@gmail.com Date: Mon Nov 22 09:21:28 2010 Log: Public: Only process requested groups. Review at http://gwt-code-reviews.appspot.com/1131801 Review by: rchan...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=9268 Added: /trunk/samples/validationtck/test/com/google/gwt/sample/validationtck/constraints/groups /trunk/samples/validationtck/test/com/google/gwt/sample/validationtck/constraints/groups/ConstraintsGroupsGwtSuite.java /trunk/samples/validationtck/test/com/google/gwt/sample/validationtck/constraints/groups/GroupTest.java /trunk/samples/validationtck/test/com/google/gwt/sample/validationtck/constraints/groups/TckTest.gwt.xml /trunk/samples/validationtck/test/com/google/gwt/sample/validationtck/constraints/groups/TckTestValidator.java /trunk/samples/validationtck/test/com/google/gwt/sample/validationtck/validatorfactory/ValidatorFactoryGwtSuite.java Deleted: /trunk/samples/validationtck/test/com/google/gwt/sample/validationtck/validatorfactory/ConstraintApplicationGwtSuite.java Modified: /trunk/samples/validation/src/com/google/gwt/sample/validation/client/ValidationView.java /trunk/samples/validation/src/com/google/gwt/sample/validation/super/com/google/gwt/sample/validation/shared/ServerValidator.java /trunk/samples/validationtck/test/com/google/gwt/sample/validationtck/constraints/application/TckTestValidator.java /trunk/user/src/com/google/gwt/validation/client/impl/AbstractGwtSpecificValidator.java /trunk/user/src/com/google/gwt/validation/rebind/ValidatorCreator.java === --- /dev/null +++ /trunk/samples/validationtck/test/com/google/gwt/sample/validationtck/constraints/groups/ConstraintsGroupsGwtSuite.java Mon Nov 22 09:21:28 2010 @@ -0,0 +1,32 @@ +/* + * 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.sample.validationtck.constraints.groups; + +import com.google.gwt.junit.tools.GWTTestSuite; + +import junit.framework.Test; + +/** + * Tck Tests for the {...@code constraints groups} package. + */ +public class ConstraintsGroupsGwtSuite { + public static Test suite() { +GWTTestSuite suite = new GWTTestSuite( +"TCK for GWT Validation, constraints groups package"); +suite.addTestSuite(GroupTest.class); +return suite; + } +} === --- /dev/null +++ /trunk/samples/validationtck/test/com/google/gwt/sample/validationtck/constraints/groups/GroupTest.java Mon Nov 22 09:21:28 2010 @@ -0,0 +1,69 @@ +/* + * 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.sample.validationtck.constraints.groups; + +import com.google.gwt.junit.client.GWTTestCase; + +/** + * Test wrapper for + * {...@link org.hibernate.jsr303.tck.tests.constraints.groups.GroupTest}. + */ +public class GroupTest extends GWTTestCase { + private final org.hibernate.jsr303.tck.tests.constraints.groups.GroupTest delegate = + new org.hibernate.jsr303.tck.tests.constraints.groups.GroupTest(); + + @Override + public String getModuleName() { + return "com.google.gwt.sample.validationtck.constraints.groups.TckTest"; + } + + public void testConstraintCanBelongToMoreThanOneGroup() { +delegate.testConstraintCanBelongToMoreThanOneGroup(); + } + + public void testConstraintWithNoExplicitlySpecifiedGroupBelongsToDefault() { + delegate.testConstraintWithNoExplicitlySpecifiedGroupBelongsToDefault(); + } + + public void testCyclicGroupSequence() { +delegate.testCyclicGroupSequence(); + } + + public void testGroups() { +delegate.testGroups(); + } + + public void testGroupSequence() { +delegate.testGroupSequence(); + } + + public void testGroupSequenceFollowedByGroup() { +delegate.testGroupSequenceFollowedByGroup(); + } + + public void testImplicitGrouping() { +
[gwt-contrib] [google-web-toolkit] r9267 committed - Edited wiki page RequestFactory_2_1_1 through web user interface.
Revision: 9267 Author: b...@google.com Date: Mon Nov 22 12:27:50 2010 Log: Edited wiki page RequestFactory_2_1_1 through web user interface. http://code.google.com/p/google-web-toolkit/source/detail?r=9267 Modified: /wiki/RequestFactory_2_1_1.wiki === --- /wiki/RequestFactory_2_1_1.wiki Mon Nov 22 04:58:42 2010 +++ /wiki/RequestFactory_2_1_1.wiki Mon Nov 22 12:27:50 2010 @@ -29,16 +29,18 @@ * (Issue 5368) Remove integer version constraint * *New API* Any simple value type, `ValueProxy`, or `EntityProxy` may be used as the version or id property for an `EntityProxy`. * This should make composite keys easier to work with. + * (Issue 5111) Improve integration with arbitrary backends +* *New API* The `ServiceLayer` API used by the request processor can be arbitrarily decorated via a `ServiceLayerDecorator`. +* *New API* A `Locator` can be specified for individual proxy types to remove the need for `findFoo()`, `getId()`, and `getVersion()` methods on the domain type. = What's in review = - * (Issue 5111) Extracting a `ServiceHelper` for `ReflectiveServiceLayer` for a simple API to interface with existing systems -* *New API* A `Locator` can be specified for entire RequestFactory declarations as well as individual proxy types -* Support for custom validation strategies. + * (Issue 5111) Bulk operations in ServiceLayer API +* This should allow for better datastore query planning. + * (Issue 5512) Fix for covariant return types in the domain API + * (Issue 5134) Ensure that RequestFactory interfaces can be extended = What's coming = - * Bulk operations in ServiceLayer API -* This should allow for better datastore query planning. * (Issue 5550) Refactor the Codex types to make them injectable. * (Issue 5523) Client-side caching of requests and EntityProxy persistence -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fix covariant return types for methods declared in domain objects. (issue1136801)
http://gwt-code-reviews.appspot.com/1136801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Add a test for issue 5134 to ensure that RequestFactory interfaces can be extended. (issue1138801)
Reviewers: rchandia, Description: Add a test for issue 5134 to ensure that RequestFactory interfaces can be extended. Patch by: bobv Review by: rchandia Reported by: pjulien Please review this at http://gwt-code-reviews.appspot.com/1138801/show Affected files: A user/test/com/google/gwt/requestfactory/shared/BasicRequestFactory.java M user/test/com/google/gwt/requestfactory/shared/SimpleRequestFactory.java Index: user/test/com/google/gwt/requestfactory/shared/BasicRequestFactory.java === --- user/test/com/google/gwt/requestfactory/shared/BasicRequestFactory.java (revision 0) +++ user/test/com/google/gwt/requestfactory/shared/BasicRequestFactory.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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.requestfactory.shared; + +/** + * A base type for {...@link SimpleRequestFactory} to ensure that extending + * RequestFactory interfaces works correctly. + */ +public interface BasicRequestFactory extends RequestFactory { + + LoggingRequest loggingRequest(); + + UserInformationRequest userInformationRequest(); +} Index: user/test/com/google/gwt/requestfactory/shared/SimpleRequestFactory.java === --- user/test/com/google/gwt/requestfactory/shared/SimpleRequestFactory.java (revision 9266) +++ user/test/com/google/gwt/requestfactory/shared/SimpleRequestFactory.java (working copy) @@ -19,13 +19,9 @@ * Simple RequesetFactory interface with two domain objects, and our standard * UserInformation and Logging services. */ -public interface SimpleRequestFactory extends RequestFactory { - - LoggingRequest loggingRequest(); +public interface SimpleRequestFactory extends BasicRequestFactory { SimpleBarRequest simpleBarRequest(); - + SimpleFooRequest simpleFooRequest(); - - UserInformationRequest userInformationRequest(); } -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Public: Only process requested groups. (issue1131801)
http://gwt-code-reviews.appspot.com/1131801/diff/1/4 File samples/validationtck/test/com/google/gwt/sample/validationtck/constraints/application/TckTestValidator.java (right): http://gwt-code-reviews.appspot.com/1131801/diff/1/4#newcode39 samples/validationtck/test/com/google/gwt/sample/validationtck/constraints/application/TckTestValidator.java:39: Woman.class}) On 2010/11/22 19:23:26, rchandia wrote: Try to keep formatting stable. Remove noise (// Visibility.class) Done. http://gwt-code-reviews.appspot.com/1131801/diff/1/11 File user/src/com/google/gwt/validation/client/impl/AbstractGwtSpecificValidator.java (right): http://gwt-code-reviews.appspot.com/1131801/diff/1/11#newcode76 user/src/com/google/gwt/validation/client/impl/AbstractGwtSpecificValidator.java:76: */ On 2010/11/22 19:23:26, rchandia wrote: fill-in or remove java-doc Done. http://gwt-code-reviews.appspot.com/1131801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Bidi support for ListBox (issue1137801)
Reviewers: jat, jlabanca, Description: Bidi support for ListBox Review by: aha...@google.com Please review this at http://gwt-code-reviews.appspot.com/1137801/show Affected files: M user/src/com/google/gwt/user/client/ui/ListBox.java M user/test/com/google/gwt/user/client/ui/ListBoxTest.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Making Column implement HasAlignment so users can specify the default alignment of cells in a co... (issue1134801)
LGTM http://gwt-code-reviews.appspot.com/1134801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Fix covariant return types for methods declared in domain objects. (issue1136801)
Reviewers: rchandia, Description: Fix covariant return types for methods declared in domain objects. Issue 5512. Patch by: bobv Review by: rchandia Please review this at http://gwt-code-reviews.appspot.com/1136801/show Affected files: M user/src/com/google/gwt/requestfactory/server/RequestFactoryInterfaceValidator.java A user/test/com/google/gwt/requestfactory/server/HasId.java M user/test/com/google/gwt/requestfactory/server/SimpleBar.java Index: user/src/com/google/gwt/requestfactory/server/RequestFactoryInterfaceValidator.java === --- user/src/com/google/gwt/requestfactory/server/RequestFactoryInterfaceValidator.java (revision 9266) +++ user/src/com/google/gwt/requestfactory/server/RequestFactoryInterfaceValidator.java (working copy) @@ -324,7 +324,25 @@ public Set exec(String internalName) { RequestFactoryInterfaceValidator.this.visit(logger, internalName, this); - return methods; + + Map toReturn = new HashMap(); + // Return most-derived methods + for (RFMethod method : methods) { +RFMethod key = new RFMethod(method.getName(), Type.getMethodDescriptor( +Type.VOID_TYPE, method.getArgumentTypes())); + +RFMethod compareTo = toReturn.get(key); +if (compareTo == null) { + toReturn.put(key, method); +} else if (isAssignable(logger, compareTo.getReturnType(), +method.getReturnType())) { + toReturn.put(key, method); + System.out.println("Replaced " + print(compareTo) + " with " + + print(method)); +} + } + + return new HashSet(toReturn.values()); } @Override @@ -856,6 +874,7 @@ clientToDomainType.put(clientType, domainType); if (isAssignable(logger, baseProxyIntf, clientType)) { + maybeCheckProxyType(logger, clientType); List list = domainToClientType.get(domainType); if (list == null) { list = new ArrayList(); Index: user/test/com/google/gwt/requestfactory/server/HasId.java === --- user/test/com/google/gwt/requestfactory/server/HasId.java (revision 0) +++ user/test/com/google/gwt/requestfactory/server/HasId.java (revision 0) @@ -0,0 +1,25 @@ +/* + * 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.requestfactory.server; + +/** + * Used to test covariant return types. + */ +public interface HasId { + Object getId(); + + Object persistAndReturnSelf(); +} Index: user/test/com/google/gwt/requestfactory/server/SimpleBar.java === --- user/test/com/google/gwt/requestfactory/server/SimpleBar.java (revision 9266) +++ user/test/com/google/gwt/requestfactory/server/SimpleBar.java (working copy) @@ -28,7 +28,7 @@ /** * Domain object for SimpleFooRequest. */ -public class SimpleBar { +public class SimpleBar implements HasId { /** * DO NOT USE THIS UGLY HACK DIRECTLY! Call {...@link #get} instead. */ @@ -88,7 +88,7 @@ public static SimpleBar getSingleton() { return findSimpleBar("1L"); } - + public static void reset() { resetImpl(); } -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add support for RpcTokens, which, if set, are sent with each RPCRequest to (issue1107801)
http://gwt-code-reviews.appspot.com/1107801/diff/3001/4005 File user/src/com/google/gwt/user/client/rpc/ServiceDefTarget.java (right): http://gwt-code-reviews.appspot.com/1107801/diff/3001/4005#newcode43 user/src/com/google/gwt/user/client/rpc/ServiceDefTarget.java:43: RpcToken getRpcToken(); On 2010/11/22 03:52:05, meder wrote: On 2010/11/20 04:33:44, xtof wrote: > How likely is it that developers will be providing their own implementations of > ServiceDefTarget? We'd be breaking them by adding methods here. I've seen it being done, so this will most definitely break some code. I'm waiting for someone from GWT team to look at this and tell me if this is fine or if I should add another interface. Do you have any reference to non-generated code that implements ServiceDefTarget? I would expect only mocks would do so. That said, it wouldn't be much of a problem to put the RpcToken APIs on another interface. http://gwt-code-reviews.appspot.com/1107801/diff/13001/14002 File user/src/com/google/gwt/user/client/rpc/RpcToken.java (right): http://gwt-code-reviews.appspot.com/1107801/diff/13001/14002#newcode28 user/src/com/google/gwt/user/client/rpc/RpcToken.java:28: public interface RpcToken extends Serializable { On 2010/11/20 04:33:44, xtof wrote: As mentioned in the draft design, I'm not sure RpcToken is the best name for this. It's really just a value that's implicitly passed along with each RPC. Maybe, RpcRequestHeader? But really I'd defer to GWT team for advice on naming here... I like RpcToken better than that. Basically, all we are saying is it is some token automatically passed with each request, and RpcToken seems descriptive and appropriately generic. http://gwt-code-reviews.appspot.com/1107801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Rework the way OperationMessages are processed to allow all domain objects to be loaded at once. (issue1135801)
Reviewers: rchandia, rjrjr, Description: Rework the way OperationMessages are processed to allow all domain objects to be loaded at once. http://code.google.com/p/google-web-toolkit/wiki/RequestFactory_2_1_1 Patch by: bobv Review by: rchandia,rjrjr Please review this at http://gwt-code-reviews.appspot.com/1135801/show Affected files: M user/src/com/google/gwt/requestfactory/server/ReflectiveServiceLayer.java M user/src/com/google/gwt/requestfactory/server/RequestState.java M user/src/com/google/gwt/requestfactory/server/ServiceLayer.java M user/src/com/google/gwt/requestfactory/server/ServiceLayerDecorator.java M user/src/com/google/gwt/requestfactory/server/SimpleRequestProcessor.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Public: Only process requested groups. (issue1131801)
LGTM. With nits. http://gwt-code-reviews.appspot.com/1131801/diff/1/4 File samples/validationtck/test/com/google/gwt/sample/validationtck/constraints/application/TckTestValidator.java (right): http://gwt-code-reviews.appspot.com/1131801/diff/1/4#newcode39 samples/validationtck/test/com/google/gwt/sample/validationtck/constraints/application/TckTestValidator.java:39: Woman.class}) Try to keep formatting stable. Remove noise (// Visibility.class) http://gwt-code-reviews.appspot.com/1131801/diff/1/11 File user/src/com/google/gwt/validation/client/impl/AbstractGwtSpecificValidator.java (right): http://gwt-code-reviews.appspot.com/1131801/diff/1/11#newcode76 user/src/com/google/gwt/validation/client/impl/AbstractGwtSpecificValidator.java:76: */ fill-in or remove java-doc http://gwt-code-reviews.appspot.com/1131801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r9265 committed - Makes part of the Compiler Report (SOYC) smaller by...
Revision: 9265 Author: zun...@google.com Date: Mon Nov 22 07:33:04 2010 Log: Makes part of the Compiler Report (SOYC) smaller by replacing a flat HTML output with output that is generated with JavaScript from a dictionary of strings. This decreases the size of the dependency reports by a factor of 5 and the overall report by a factor of 4. There is a difference in the time to display for a report of a large app when running in Chrome for what was a 5MB report. (It takes longer to build the report using javascript) Review at http://gwt-code-reviews.appspot.com/1123801 Review by: kpro...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=9265 Added: /trunk/dev/core/test/com/google/gwt/soyc /trunk/dev/core/test/com/google/gwt/soyc/MakeTopLevelHtmlForPermTest.java Modified: /trunk/dev/core/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java === --- /dev/null +++ /trunk/dev/core/test/com/google/gwt/soyc/MakeTopLevelHtmlForPermTest.java Mon Nov 22 07:33:04 2010 @@ -0,0 +1,65 @@ +/* + * 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.soyc; + +import junit.framework.TestCase; + +/** + * Test cases for {...@link MakeTopLevelHtmlForPerm}. + */ +public class MakeTopLevelHtmlForPermTest extends TestCase { + + public void testGetClassSubstring() { +assertEquals("myClass", MakeTopLevelHtmlForPerm.getClassSubstring("com.foo.myClass")); +assertEquals("myClass", MakeTopLevelHtmlForPerm.getClassSubstring("com.foo.myClass::myMethod")); + +// We don't really expect these inputs, just testing to make sure they don't blow up +assertEquals("Empty string", "", MakeTopLevelHtmlForPerm.getClassSubstring("")); +assertEquals("", MakeTopLevelHtmlForPerm.getClassSubstring("::myMethod")); +assertEquals("", MakeTopLevelHtmlForPerm.getMethodSubstring(":")); +assertEquals("", MakeTopLevelHtmlForPerm.getMethodSubstring("::")); +assertEquals("", MakeTopLevelHtmlForPerm.getMethodSubstring("...")); +assertEquals("", MakeTopLevelHtmlForPerm.getMethodSubstring("..")); +assertEquals("", MakeTopLevelHtmlForPerm.getMethodSubstring(".")); + } + + public void testGetMethodSubstring() { +assertEquals("", MakeTopLevelHtmlForPerm.getMethodSubstring("com.foo.myClass")); +assertEquals("myMethod", MakeTopLevelHtmlForPerm.getMethodSubstring("com.foo.myClass::myMethod")); + +// We don't really expect these inputs, just testing to make sure they don't blow up +assertEquals("Empty string", "", MakeTopLevelHtmlForPerm.getMethodSubstring("")); +assertEquals("myMethod", MakeTopLevelHtmlForPerm.getMethodSubstring("::myMethod")); +assertEquals("", MakeTopLevelHtmlForPerm.getMethodSubstring("myMethod")); +assertEquals("", MakeTopLevelHtmlForPerm.getMethodSubstring(":")); +assertEquals("", MakeTopLevelHtmlForPerm.getMethodSubstring("::")); + } + + public void testGetPackageSubstring() { +assertEquals("com.foo", MakeTopLevelHtmlForPerm.getPackageSubstring("com.foo.myClass")); +assertEquals("com.foo", MakeTopLevelHtmlForPerm.getPackageSubstring("com.foo.myClass::myMethod")); + +// We don't really expect these inputs, just testing to make sure they don't blow up +assertEquals("Empty string", "", MakeTopLevelHtmlForPerm.getPackageSubstring("")); +assertEquals("com.foo", MakeTopLevelHtmlForPerm.getPackageSubstring("com.foo.myClass::")); +assertEquals("com.foo", MakeTopLevelHtmlForPerm.getPackageSubstring("com.foo.myClass:")); +assertEquals("com", MakeTopLevelHtmlForPerm.getPackageSubstring("com")); +assertEquals("", MakeTopLevelHtmlForPerm.getMethodSubstring("...")); +assertEquals("", MakeTopLevelHtmlForPerm.getMethodSubstring("..")); +assertEquals("", MakeTopLevelHtmlForPerm.getMethodSubstring(".")); + } +} === --- /trunk/dev/core/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java Wed Nov 10 09:09:23 2010 +++ /trunk/dev/core/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java Mon Nov 22 07:33:04 2010 @@ -34,6 +34,7 @@ import java.util.Arrays; import java.util.Collections; import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Set; @@ -153,6 +154,52 @@ addStandardHtmlEnding(outFile); outFile.close(); } + + /** + * @return given "com.foo.my
[gwt-contrib] Making Column implement HasAlignment so users can specify the default alignment of cells in a co... (issue1134801)
Reviewers: rchandia, Description: Making Column implement HasAlignment so users can specify the default alignment of cells in a column. In the future, we may add a way to specify the alignment of specific Cells. Please review this at http://gwt-code-reviews.appspot.com/1134801/show Affected files: M samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/CwCellSampler.java M user/src/com/google/gwt/user/cellview/client/CellTable.java M user/src/com/google/gwt/user/cellview/client/Column.java M user/test/com/google/gwt/user/cellview/client/CellTableTest.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add Locator API to allow arbitrary domain types to be used with RequestFactory. (issue1130801)
LGTM. Only cosmetic nits http://gwt-code-reviews.appspot.com/1130801/diff/21001/4006 File user/src/com/google/gwt/autobean/shared/AutoBeanFactory.java (right): http://gwt-code-reviews.appspot.com/1130801/diff/21001/4006#newcode85 user/src/com/google/gwt/autobean/shared/AutoBeanFactory.java:85: * The types specified by this annotation will not have be wrapped in by an Remove "have" http://gwt-code-reviews.appspot.com/1130801/diff/21001/4013 File user/src/com/google/gwt/requestfactory/server/RequestFactoryServlet.java (right): http://gwt-code-reviews.appspot.com/1130801/diff/21001/4013#newcode98 user/src/com/google/gwt/requestfactory/server/RequestFactoryServlet.java:98: * @param exceptionHandler an {...@link ExceptionHandler} instance Missing JavaDoc for serviceDecorators http://gwt-code-reviews.appspot.com/1130801/diff/21001/4017 File user/src/com/google/gwt/requestfactory/server/ServiceLayer.java (right): http://gwt-code-reviews.appspot.com/1130801/diff/21001/4017#newcode69 user/src/com/google/gwt/requestfactory/server/ServiceLayer.java:69: // Make the ReflectiveServiceLayer point to the cache ResolverServiceLayer, perhaps? http://gwt-code-reviews.appspot.com/1130801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Makes part of the Compiler Report (SOYC) smaller by (issue1123801)
LGTM. Nice! I would probably just add a test for empty strings. http://gwt-code-reviews.appspot.com/1123801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r9264 committed - Add SafeHtml support to DirectionEstimator
Revision: 9264 Author: tomer...@google.com Date: Mon Nov 22 06:12:51 2010 Log: Add SafeHtml support to DirectionEstimator http://code.google.com/p/google-web-toolkit/source/detail?r=9264 Modified: /trunk/tools/api-checker/config/gwt21_22userApi.conf /trunk/user/src/com/google/gwt/i18n/shared/DirectionEstimator.java === --- /trunk/tools/api-checker/config/gwt21_22userApi.conf Thu Nov 11 05:24:51 2010 +++ /trunk/tools/api-checker/config/gwt21_22userApi.conf Mon Nov 22 06:12:51 2010 @@ -137,3 +137,9 @@ com.google.gwt.user.client.impl.DOMImplMozillaOld MISSING com.google.gwt.user.client.ui.impl.RichTextAreaImplOldMozilla MISSING com.google.gwt.xml.client.impl.XMLParserImplMozillaOld MISSING + +# DirectionEstimator::estimateDirection(SafeHtml html) was added, and does not accept null +com.google.gwt.i18n.shared.AnyRtlDirectionEstimator::estimateDirection(Ljava/lang/String;) OVERLOADED_METHOD_CALL +com.google.gwt.i18n.shared.DirectionEstimator::estimateDirection(Ljava/lang/String;) OVERLOADED_METHOD_CALL +com.google.gwt.i18n.shared.FirstStrongDirectionEstimator::estimateDirection(Ljava/lang/String;) OVERLOADED_METHOD_CALL +com.google.gwt.i18n.shared.WordCountDirectionEstimator::estimateDirection(Ljava/lang/String;) OVERLOADED_METHOD_CALL === --- /trunk/user/src/com/google/gwt/i18n/shared/DirectionEstimator.java Sun Apr 25 03:44:04 2010 +++ /trunk/user/src/com/google/gwt/i18n/shared/DirectionEstimator.java Mon Nov 22 06:12:51 2010 @@ -16,6 +16,7 @@ package com.google.gwt.i18n.shared; import com.google.gwt.i18n.client.HasDirection.Direction; +import com.google.gwt.safehtml.shared.SafeHtml; /** * Interface for direction estimators. @@ -41,4 +42,15 @@ public Direction estimateDirection(String str, boolean isHtml) { return estimateDirection(BidiUtils.get().stripHtmlIfNeeded(str, isHtml)); } -} + + /** + * Estimates the direction of a SafeHtml. + * + * @param html The string to check. + * @return {...@code html}'s estimated direction. + */ + public Direction estimateDirection(SafeHtml html) { +return estimateDirection(BidiUtils.get().stripHtmlIfNeeded(html.asString(), +true)); + } +} -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: IE devmode plugin: 64 bits support end-to-end, build fixes & cleanup, other polishing items. (issue1116801)
http://gwt-code-reviews.appspot.com/1116801/diff/1/11 File plugins/ie/installer/wix/candle.exe.config (right): http://gwt-code-reviews.appspot.com/1116801/diff/1/11#newcode3 plugins/ie/installer/wix/candle.exe.config:3: Copyright (c) Microsoft Corporation. All rights reserved. On 2010/11/22 16:40:40, fabiomfv wrote: On 2010/11/18 16:17:54, conroy wrote: > does this msft copyright need to be here? > > if anything, shouldn't all these new files be getting the standard GWT copyright > notice? this a MS tool licensed to OS. I believe removing the copyright might be an issue. I will check with legal just in case (thanks Philip). http://gwt-code-reviews.appspot.com/1116801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: IE devmode plugin: 64 bits support end-to-end, build fixes & cleanup, other polishing items. (issue1116801)
http://gwt-code-reviews.appspot.com/1116801/diff/1/6 File plugins/ie/installer/build.cmd (right): http://gwt-code-reviews.appspot.com/1116801/diff/1/6#newcode8 plugins/ie/installer/build.cmd:8: echo IMPORTANT: Make sure "%~dp0oophm.wsx" is checked out and writable! On 2010/11/18 16:17:54, conroy wrote: Rather than just blindly warning about this, why not test and error if the files aren't writable? Also, s/prebuild/prebuilt Done. http://gwt-code-reviews.appspot.com/1116801/diff/1/11 File plugins/ie/installer/wix/candle.exe.config (right): http://gwt-code-reviews.appspot.com/1116801/diff/1/11#newcode3 plugins/ie/installer/wix/candle.exe.config:3: Copyright (c) Microsoft Corporation. All rights reserved. On 2010/11/18 16:17:54, conroy wrote: does this msft copyright need to be here? if anything, shouldn't all these new files be getting the standard GWT copyright notice? this a MS tool licensed to OS. I believe removing the copyright might be an issue. http://gwt-code-reviews.appspot.com/1116801/diff/1/15 File plugins/ie/oophm/oophm/dllmain.cpp (right): http://gwt-code-reviews.appspot.com/1116801/diff/1/15#newcode36 plugins/ie/oophm/oophm/dllmain.cpp:36: AllowDialog::setHInstance(hInstance); On 2010/11/18 16:17:54, conroy wrote: indentation looks off here Done. http://gwt-code-reviews.appspot.com/1116801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Suggestion: Hideable (or HasVisibility) interface
While developing a medium-large scale app with GWT, I repeatedly encountered the need to pass around UI objects that "can be hidden", that is, have the interface: interface Hideable { public void setVisible(boolean isVisible); } GWT's UIObject already has such a method, but nowhere is such an interface used (unlike HasText, HasClickHandlers, etc...) I'm suggesting adding that interface plus any other of the sort and changing the class hierarchy so that all appropriate classes actually have "implements" relations to these interfaces. Backwards compatibility: full API changes: none, except that users can now pass around Hideable instances rather than having to specify the exact type of object that they're using. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Makes part of the Compiler Report (SOYC) smaller by (issue1123801)
I handled those cases and added unit tests. http://gwt-code-reviews.appspot.com/1123801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Makes part of the Compiler Report (SOYC) smaller by (issue1123801)
http://gwt-code-reviews.appspot.com/1123801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r9263 committed - Edited wiki page RequestFactory_2_1_1 through web user interface.
Revision: 9263 Author: b...@google.com Date: Mon Nov 22 04:58:42 2010 Log: Edited wiki page RequestFactory_2_1_1 through web user interface. http://code.google.com/p/google-web-toolkit/source/detail?r=9263 Modified: /wiki/RequestFactory_2_1_1.wiki === --- /wiki/RequestFactory_2_1_1.wiki Fri Nov 19 05:24:53 2010 +++ /wiki/RequestFactory_2_1_1.wiki Mon Nov 22 04:58:42 2010 @@ -26,19 +26,19 @@ * This makes client updates applied to a ValueProxy potentially destructive to server-side state if the ValueProxy represents only a subset of the data in the value domain object. * If you don't want the destructive operation, don't use value objects, or use the to-be-written service helper / Locator to cook up your own id scheme. * Since we currently support Date (and it is mutable) the RF client-side code will use a subclass of Date that can be frozen to ensure that the owning EntityProxy must be edited. - -= What's in review = - * (Issue 5368) Remove integer version constraint * *New API* Any simple value type, `ValueProxy`, or `EntityProxy` may be used as the version or id property for an `EntityProxy`. * This should make composite keys easier to work with. -= What's coming = += What's in review = * (Issue 5111) Extracting a `ServiceHelper` for `ReflectiveServiceLayer` for a simple API to interface with existing systems -* This should include support for bulk operations API in `ReflectiveServiceLayer` to allow query plan optimization -* A `Locator` can be specified for entire RequestFactory declarations as well as individual proxy types +* *New API* A `Locator` can be specified for entire RequestFactory declarations as well as individual proxy types * Support for custom validation strategies. + += What's coming = + * Bulk operations in ServiceLayer API +* This should allow for better datastore query planning. * (Issue 5550) Refactor the Codex types to make them injectable. * (Issue 5523) Client-side caching of requests and EntityProxy persistence -- http://groups.google.com/group/Google-Web-Toolkit-Contributors