[gwt-contrib] Fixes a strange compiler bug where types generated into new packages may not be found. (issue831802)
Reviewers: conroy, zundel, Description: The bug happened to me when generating types into a package which didn't exist on disk, in this com.google.gwt.user.client.rpc.core.java.lang.annotation. The WebModeCompiler thought the types didn't exist. This fix makes it so that newly-generated types get packages added immediately. Please review this at http://gwt-code-reviews.appspot.com/831802/show Affected files: M dev/core/src/com/google/gwt/dev/javac/StandardGeneratorContext.java M dev/core/src/com/google/gwt/dev/jdt/AbstractCompiler.java M dev/core/src/com/google/gwt/dev/jdt/WebModeCompilerFrontEnd.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fix DevMode memory leaks by attaching cache lifetimes to the GeneratorContext (issue826802)
http://gwt-code-reviews.appspot.com/826802/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add ability to use @UiChild annotation to specify how GWT should add a child element. (issue794801)
http://gwt-code-reviews.appspot.com/794801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add ability to use @UiChild annotation to specify how GWT should add a child element. (issue794801)
http://gwt-code-reviews.appspot.com/794801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] compile error when attempting to build expenses app VIA maven
gotcha, that took care of it. I guess this was to help out with there new maven approach. Pretty cool On Wed, Sep 1, 2010 at 9:15 PM, BobV wrote: > On Wed, Sep 1, 2010 at 6:08 PM, tc wrote: > > I am getting lots of errors when attempting to do a mvn compile on the > > expenses app. > > I just got through this. > > From trunk, run ./tools/scripts/maven_script.sh > > > -- > Bob Vawter > Google Web Toolkit Team > > -- > http://groups.google.com/group/Google-Web-Toolkit-Contributors > -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] compile error when attempting to build expenses app VIA maven
On Wed, Sep 1, 2010 at 6:08 PM, tc wrote: > I am getting lots of errors when attempting to do a mvn compile on the > expenses app. I just got through this. >From trunk, run ./tools/scripts/maven_script.sh -- Bob Vawter Google Web Toolkit Team -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] compile error when attempting to build expenses app VIA maven
I am getting lots of errors when attempting to do a mvn compile on the expenses app. -the import com.google.gwt.requestfactory.shared.Record cannot be resolved -SyncResult cannot be resolved to a type -import com.google.gwt.requestfactory.shared.RecordChangedEvent cannot be resolved I think there are more but its hard to sift through it all. Just wanted to let you guys know just incase its something that was missed. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Update i18n Messages to include: (issue796802)
http://gwt-code-reviews.appspot.com/796802/diff/1/23 File user/test/com/google/gwt/i18n/client/TestAnnotatedMessages.java (right): http://gwt-code-reviews.appspot.com/796802/diff/1/23#newcode199 user/test/com/google/gwt/i18n/client/TestAnnotatedMessages.java:199: String reviewers(@PluralCount @Offset(2) int size, Good suggestion, additional tests caught that the list formatting code was totally broken for SafeHtml return values and SafeHtml argument values. http://gwt-code-reviews.appspot.com/796802/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r8695 committed - Added missing datanucleus-core dependency in main dependencies section...
Revision: 8695 Author: rj...@google.com Date: Wed Sep 1 14:06:25 2010 Log: Added missing datanucleus-core dependency in main dependencies section. Review at http://gwt-code-reviews.appspot.com/833801 Review by: drfibona...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=8695 Modified: /trunk/samples/expenses/pom.xml === --- /trunk/samples/expenses/pom.xml Wed Sep 1 13:02:46 2010 +++ /trunk/samples/expenses/pom.xml Wed Sep 1 14:06:25 2010 @@ -164,6 +164,18 @@ datanucleus-appengine 1.0.7.final + + +org.datanucleus +datanucleus-core +${datanucleus.version} + + +javax.transaction +transaction-api + + + com.google.appengine appengine-api-1.0-sdk -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Update i18n Messages to include: (issue796802)
http://gwt-code-reviews.appspot.com/796802/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: Push back roo to a released version. (issue832801)
gotcha On Wed, Sep 1, 2010 at 8:08 PM, Ray Ryan wrote: > I know that M2 works. > > On Wed, Sep 1, 2010 at 5:06 PM, Travis Camechis wrote: > >> wouldn't it be 1.1.0M3 instead of M2? >> >> On Wed, Sep 1, 2010 at 6:58 PM, BobV wrote: >> >>> On Wed, Sep 1, 2010 at 3:56 PM, wrote: >>> > Push back roo to a released version. >>> >>> LGTM >>> >>> -- >>> Bob Vawter >>> Google Web Toolkit Team >>> >>> -- >>> http://groups.google.com/group/Google-Web-Toolkit-Contributors >>> >> >> -- >> http://groups.google.com/group/Google-Web-Toolkit-Contributors >> > > -- > http://groups.google.com/group/Google-Web-Toolkit-Contributors > -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: Push back roo to a released version. (issue832801)
I know that M2 works. On Wed, Sep 1, 2010 at 5:06 PM, Travis Camechis wrote: > wouldn't it be 1.1.0M3 instead of M2? > > On Wed, Sep 1, 2010 at 6:58 PM, BobV wrote: > >> On Wed, Sep 1, 2010 at 3:56 PM, wrote: >> > Push back roo to a released version. >> >> LGTM >> >> -- >> Bob Vawter >> Google Web Toolkit Team >> >> -- >> http://groups.google.com/group/Google-Web-Toolkit-Contributors >> > > -- > http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: Push back roo to a released version. (issue832801)
wouldn't it be 1.1.0M3 instead of M2? On Wed, Sep 1, 2010 at 6:58 PM, BobV wrote: > On Wed, Sep 1, 2010 at 3:56 PM, wrote: > > Push back roo to a released version. > > LGTM > > -- > Bob Vawter > Google Web Toolkit Team > > -- > http://groups.google.com/group/Google-Web-Toolkit-Contributors > -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Added missing datanucleus-core dependency in main dependencies section. (issue833801)
Reviewers: drfibonacci, Description: Added missing datanucleus-core dependency in main dependencies section. Please review this at http://gwt-code-reviews.appspot.com/833801/show Affected files: M samples/expenses/pom.xml Index: samples/expenses/pom.xml === --- samples/expenses/pom.xml(revision 8694) +++ samples/expenses/pom.xml(working copy) @@ -163,6 +163,18 @@ com.google.appengine.orm datanucleus-appengine 1.0.7.final + + + +org.datanucleus +datanucleus-core +${datanucleus.version} + + +javax.transaction +transaction-api + + com.google.appengine -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Fix DevMode memory leaks by attaching cache lifetimes to the GeneratorContext (issue826802)
Reviewers: scottb, jat, bobv, Description: Fix DevMode memory leaks by attaching cache lifetimes to the GeneratorContext Please review this at http://gwt-code-reviews.appspot.com/826802/show Affected files: M dev/core/src/com/google/gwt/core/ext/GeneratorContext.java M dev/core/src/com/google/gwt/core/ext/typeinfo/TypeOracle.java M dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java M dev/core/src/com/google/gwt/dev/javac/StandardGeneratorContext.java M dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java A dev/core/test/com/google/gwt/dev/cfg/MockModuleDef.java M dev/core/test/com/google/gwt/dev/shell/StandardGeneratorContextTest.java M user/src/com/google/gwt/i18n/rebind/AbstractLocalizableImplCreator.java M user/src/com/google/gwt/i18n/rebind/AnnotationsResource.java M user/src/com/google/gwt/i18n/rebind/CachedGeneratorContext.java D user/src/com/google/gwt/i18n/rebind/ClearStaticData.java M user/src/com/google/gwt/i18n/rebind/CurrencyListGenerator.java M user/src/com/google/gwt/i18n/rebind/CustomDateTimeFormatGenerator.java M user/src/com/google/gwt/i18n/rebind/LocaleInfoGenerator.java M user/src/com/google/gwt/i18n/rebind/LocaleUtils.java M user/src/com/google/gwt/i18n/rebind/LocalizableGenerator.java M user/src/com/google/gwt/i18n/rebind/ResourceFactory.java M user/src/com/google/gwt/resources/rebind/context/AbstractResourceContext.java M user/src/com/google/gwt/uibinder/elementparsers/BeanParser.java M user/src/com/google/gwt/uibinder/rebind/UiBinderGenerator.java M user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java M user/src/com/google/gwt/uibinder/rebind/model/OwnerClass.java M user/src/com/google/gwt/uibinder/rebind/model/OwnerField.java M user/src/com/google/gwt/uibinder/rebind/model/OwnerFieldClass.java M user/test/com/google/gwt/uibinder/elementparsers/ElementParserTester.java M user/test/com/google/gwt/uibinder/elementparsers/MockUiBinderWriter.java M user/test/com/google/gwt/uibinder/rebind/model/OwnerClassTest.java M user/test/com/google/gwt/uibinder/rebind/model/OwnerFieldClassTest.java M user/test/com/google/gwt/uibinder/rebind/model/OwnerFieldTest.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r8694 committed - Remove non-determinism from ClassSourceFileComposerFactory and RpcProx...
Revision: 8694 Author: sco...@google.com Date: Wed Sep 1 13:19:51 2010 Log: Remove non-determinism from ClassSourceFileComposerFactory and RpcProxyCreator. Review by: robertvaw...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=8694 Modified: /trunk/user/src/com/google/gwt/rpc/rebind/RpcProxyCreator.java /trunk/user/src/com/google/gwt/user/rebind/ClassSourceFileComposerFactory.java === --- /trunk/user/src/com/google/gwt/rpc/rebind/RpcProxyCreator.java Wed Mar 3 09:01:30 2010 +++ /trunk/user/src/com/google/gwt/rpc/rebind/RpcProxyCreator.java Wed Sep 1 13:19:51 2010 @@ -50,8 +50,8 @@ import java.io.PrintWriter; import java.util.ArrayList; import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; @@ -133,9 +133,9 @@ TypeOracle typeOracle = ctx.getTypeOracle(); JClassType objectType = typeOracle.getJavaLangObject(); -Set classLiterals = new HashSet(); -Map serializerMethods = new HashMap(); -Map> fields = new HashMap>(); +Set classLiterals = new LinkedHashSet(); +Map serializerMethods = new LinkedHashMapJMethod>(); +Map> fields = new LinkedHashMapList>(); StringBuilder sb = writeArtificialRescues(typeOracle, serializationSto, deserializationSto); @@ -303,7 +303,7 @@ private StringBuilder writeArtificialRescues(TypeOracle typeOracle, SerializableTypeOracle serializationSto, SerializableTypeOracle deserializationSto) { -Set serializableTypes = new HashSet(); +Set serializableTypes = new LinkedHashSet(); Collections.addAll(serializableTypes, serializationSto.getSerializableTypes()); Collections.addAll(serializableTypes, === --- /trunk/user/src/com/google/gwt/user/rebind/ClassSourceFileComposerFactory.java Mon Jul 6 16:17:17 2009 +++ /trunk/user/src/com/google/gwt/user/rebind/ClassSourceFileComposerFactory.java Wed Sep 1 13:19:51 2010 @@ -20,7 +20,7 @@ import java.io.PrintWriter; import java.util.ArrayList; import java.util.HashMap; -import java.util.HashSet; +import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; @@ -68,9 +68,9 @@ private String className; - private Set imports = new HashSet(); - - private Set interfaceNames = new HashSet(); + private Set imports = new LinkedHashSet(); + + private Set interfaceNames = new LinkedHashSet(); private String packageName; -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r8693 committed - Push back roo to a released version....
Revision: 8693 Author: rj...@google.com Date: Wed Sep 1 13:02:46 2010 Log: Push back roo to a released version. Review at http://gwt-code-reviews.appspot.com/832801 Review by: robertvaw...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=8693 Modified: /trunk/samples/expenses/pom.xml === --- /trunk/samples/expenses/pom.xml Fri Aug 27 10:51:29 2010 +++ /trunk/samples/expenses/pom.xml Wed Sep 1 13:02:46 2010 @@ -7,7 +7,7 @@ 0.1.0.BUILD-SNAPSHOT expenses - 1.1.0.M4 + 1.1.0.M2 3.0.3.RELEASE 1.6.10.M1 1.6.1 -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Push back roo to a released version. (issue832801)
On Wed, Sep 1, 2010 at 3:56 PM, wrote: > Push back roo to a released version. LGTM -- Bob Vawter Google Web Toolkit Team -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Push back roo to a released version. (issue832801)
Reviewers: bobv, Description: Push back roo to a released version. Please review this at http://gwt-code-reviews.appspot.com/832801/show Affected files: M samples/expenses/pom.xml Index: samples/expenses/pom.xml === --- samples/expenses/pom.xml(revision 8687) +++ samples/expenses/pom.xml(working copy) @@ -7,7 +7,7 @@ 0.1.0.BUILD-SNAPSHOT expenses - 1.1.0.M4 + 1.1.0.M2 3.0.3.RELEASE 1.6.10.M1 1.6.1 -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r8692 committed - Edited wiki page CssResource through web user interface.
Revision: 8692 Author: b...@google.com Date: Wed Sep 1 15:48:16 2010 Log: Edited wiki page CssResource through web user interface. http://code.google.com/p/google-web-toolkit/source/detail?r=8692 Modified: /wiki/CssResource.wiki === --- /wiki/CssResource.wiki Mon Jun 14 08:20:35 2010 +++ /wiki/CssResource.wiki Wed Sep 1 15:48:16 2010 @@ -641,6 +641,31 @@ The generated interface will be emitted to `System.out`. The `-standalone` option will add the necessary `package` and `import` statements to the output so that it can be used as part of a build process. +=Debugging and testing= + +Runtime debugging information can be turned on for testing and QA builds by adding the following to your module definition: +{{{ + +}}} + +This will enable the `CssResource.getDebugInfo()` method. This returns a `DebugInfo` object which provides access to various metadata about the CssResource, including a deobfuscation map. Additionally, this module will install a [http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/gwt/resources/client/impl/CssResourceObserver.java CssResourceObserver] that will manage a global CssResource obfuscation map to enable integration testing to use CssResource class names. + +Given the following CssResource declaration: +{{{ +package com.example; +interface MyCssResource extends CssResource { + String someClass(); +} +interface MyClientBundle extends ClientBundle { + MyCssResource css(); +} +}}} +a test of the `com.example.MyModule` GWT module can look up the value that would be returned by `someClass()` using the following snippet of JavaScript: +{{{ +var obf = window.gwtCssResource['com.example.MyModule']['com.example.MyClientBundle.css.someClass']; +var elements = document.findElementsByClassName(obf); +// test elements +}}} =Important open questions= * Can we manipulate style rules across browsers? -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] TypeSerializerCreator generates pure Java code path for DevMode. (issue831801)
Reviewers: bobv, jat, Description: Since it's hard to think about the diffs in a generator, I included a diff of a generated file showing what it does. Please review this at http://gwt-code-reviews.appspot.com/831801/show Affected files: M eclipse/samples/DynaTable/gen/com/google/gwt/sample/dynatable/client/SchoolCalendarService_TypeSerializer.java M user/src/com/google/gwt/user/client/rpc/core/java/util/Arrays.java M user/src/com/google/gwt/user/client/rpc/core/java/util/Collections.java M user/src/com/google/gwt/user/client/rpc/impl/SerializerBase.java M user/src/com/google/gwt/user/rebind/rpc/CustomFieldSerializerValidator.java M user/src/com/google/gwt/user/rebind/rpc/ProxyCreator.java M user/src/com/google/gwt/user/rebind/rpc/TypeSerializerCreator.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r8691 committed - Add debugging information to CssResource....
Revision: 8691 Author: gwt.mirror...@gmail.com Date: Wed Sep 1 15:26:33 2010 Log: Add debugging information to CssResource. Patch by: bobv Review by: rjrjr Review at http://gwt-code-reviews.appspot.com/770801 http://code.google.com/p/google-web-toolkit/source/detail?r=8691 Added: /trunk/user/src/com/google/gwt/resources/EnableCssResourceDebugging.gwt.xml /trunk/user/src/com/google/gwt/resources/client/impl/CssResourceObserver.java /trunk/user/src/com/google/gwt/resources/css/CssDebugInfo.java /trunk/user/src/com/google/gwt/resources/css/CssDebugInfoImpl.java /trunk/user/test/com/google/gwt/resources/client/CssResourceDebugInfoTest.java Modified: /trunk/user/src/com/google/gwt/resources/Resources.gwt.xml /trunk/user/src/com/google/gwt/resources/client/CssResource.java /trunk/user/src/com/google/gwt/resources/css/ClassRenamer.java /trunk/user/src/com/google/gwt/resources/css/ast/CssStylesheet.java /trunk/user/src/com/google/gwt/resources/rg/CssResourceGenerator.java /trunk/user/test/com/google/gwt/resources/ResourcesSuite.java /trunk/user/test/com/google/gwt/resources/client/CSSResourceTest.java === --- /dev/null +++ /trunk/user/src/com/google/gwt/resources/EnableCssResourceDebugging.gwt.xml Wed Sep 1 15:26:33 2010 @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + value="true" /> + class="com.google.gwt.resources.client.impl.CssResourceObserver.Mapper"> +class="com.google.gwt.resources.client.impl.CssResourceObserver" /> + + === --- /dev/null +++ /trunk/user/src/com/google/gwt/resources/client/impl/CssResourceObserver.java Wed Sep 1 15:26:33 2010 @@ -0,0 +1,103 @@ +/* + * 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.resources.client.impl; + +import com.google.gwt.core.client.GWT; +import com.google.gwt.core.client.JavaScriptObject; +import com.google.gwt.resources.client.CssResource; +import com.google.gwt.resources.client.CssResource.DebugInfo; + +import java.util.Map; + +/** + * Enables CssResources to be intercepted before injection. The base + * implementation is a no-op. + * + * This is an internal implementation API that is subject to change. + */ +public class CssResourceObserver { + private static final CssResourceObserver IMPL = GWT.create(CssResourceObserver.class); + + /** + * An implementation of CssResourceObserver that records CssResource + * obfuscation data into a JavaScriptObject accessible on the main application + * window as $wnd.gwtCssResource['moduleName']. + * + * The keys on this object will be of the form + *. . + * . An example key might be + * com.example.Resources.superButton.button-outer-div. The value + * associated with the key is the (possibly obfuscated) CSS class selector + * used in the injected code. + */ + public static class Mapper extends CssResourceObserver { +private final JavaScriptObject myMap; + +public Mapper() { + myMap = ensureMap(); +} + +@Override +protected T registerImpl(T resource) { + DebugInfo info = resource.getDebugInfo(); + if (info != null) { +String prefix = info.getOwnerType() + "." + info.getMethodName() + "."; +for (Map.Entry entry : info.getClassMap().entrySet()) { + set(myMap, prefix + entry.getKey(), entry.getValue()); +} + } + return resource; +} + +/** + * Creates or returns the module-specific CssResource map. + */ +private native JavaScriptObject ensureMap() /*-{ + var topMap = $wnd.gwtCssResource; + if (!topMap) { +topMap = $wnd.gwtCssResource = {}; + } + var moduleName = @com.google.gwt.core.client.GWT::getModuleName()(); + var myMap = topMap[moduleName]; + if (!myMap) { + myMap = topMap[moduleName] = {}; + } + return myMap; +}-*/; + +/** + * Trivial JS associative array assignment. + */ +private native void set(JavaScriptObject map, String key, String value) /*-{ + map[key] = value; +}-*/; + } + + /** + * Register a CssResource. This method is called from code generated by + * CssResourceGenerator. + */ + public static T register(T resource) { +return IMPL.registerImpl(resource); + } + + /** + * No-op. + */ + protec
[gwt-contrib] Re: Support adding code-gen/runtime related classes directly to the secondary JDT compilation for th... (issue830801)
LGTM http://gwt-code-reviews.appspot.com/830801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Support adding code-gen/runtime related classes directly to the secondary JDT compilation for th... (issue830801)
Reviewers: scottb, Description: Support adding code-gen/runtime related classes directly to the secondary JDT compilation for the GWT AST. Please review this at http://gwt-code-reviews.appspot.com/830801/show Affected files: M dev/core/src/com/google/gwt/dev/jdt/BasicWebModeCompiler.java M dev/core/src/com/google/gwt/dev/jdt/WebModeCompilerFrontEnd.java M dev/core/src/com/google/gwt/dev/jjs/UnifiedAst.java Index: dev/core/src/com/google/gwt/dev/jdt/BasicWebModeCompiler.java === --- dev/core/src/com/google/gwt/dev/jdt/BasicWebModeCompiler.java (revision 8689) +++ dev/core/src/com/google/gwt/dev/jdt/BasicWebModeCompiler.java (working copy) @@ -30,6 +30,7 @@ import org.eclipse.jdt.internal.compiler.env.ICompilationUnit; import java.util.ArrayList; +import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Map; @@ -64,8 +65,8 @@ * Build the initial set of compilation units. */ public CompilationResults getCompilationUnitDeclarations( - TreeLogger logger, String[] seedTypeNames) - throws UnableToCompleteException { + TreeLogger logger, String[] seedTypeNames, + ICompilationUnit... additionalUnits) throws UnableToCompleteException { TypeOracle oracle = compilationState.getTypeOracle(); Set intfTypes = oracle.getSingleJsoImplInterfaces(); @@ -80,7 +81,9 @@ Set alreadyAdded = new HashSet(); List icus = new ArrayList( -seedTypeNames.length + intfTypes.size()); +seedTypeNames.length + intfTypes.size() + additionalUnits.length); + +Collections.addAll(icus, additionalUnits); for (String seedTypeName : seedTypeNames) { CompilationUnit unit = getUnitForType(logger, classMapBySource, Index: dev/core/src/com/google/gwt/dev/jdt/WebModeCompilerFrontEnd.java === --- dev/core/src/com/google/gwt/dev/jdt/WebModeCompilerFrontEnd.java (revision 8689) +++ dev/core/src/com/google/gwt/dev/jdt/WebModeCompilerFrontEnd.java (working copy) @@ -27,6 +27,7 @@ import com.google.gwt.dev.util.log.speedtracer.SpeedTracerLogger.Event; import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration; +import org.eclipse.jdt.internal.compiler.env.ICompilationUnit; import org.eclipse.jdt.internal.compiler.lookup.MethodBinding; import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding; import org.eclipse.jdt.internal.compiler.lookup.TypeBinding; @@ -46,12 +47,13 @@ public static CompilationResults getCompilationUnitDeclarations( TreeLogger logger, String[] seedTypeNames, - RebindPermutationOracle rebindPermOracle, TypeLinker linker) - throws UnableToCompleteException { + RebindPermutationOracle rebindPermOracle, TypeLinker linker, + ICompilationUnit... additionalUnits) throws UnableToCompleteException { Event getCompilationUnitsEvent = SpeedTracerLogger.start(CompilerEventType.GET_COMPILATION_UNITS); CompilationResults results = new WebModeCompilerFrontEnd(rebindPermOracle, -linker).getCompilationUnitDeclarations(logger, seedTypeNames); +linker).getCompilationUnitDeclarations(logger, seedTypeNames, +additionalUnits); getCompilationUnitsEvent.end(); return results; } Index: dev/core/src/com/google/gwt/dev/jjs/UnifiedAst.java === --- dev/core/src/com/google/gwt/dev/jjs/UnifiedAst.java (revision 8689) +++ dev/core/src/com/google/gwt/dev/jjs/UnifiedAst.java (working copy) @@ -54,7 +54,7 @@ return jProgram; } -JsProgram getJsProgram() { +public JsProgram getJsProgram() { return jsProgram; } } -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add SafeHtml support to ui widgets. (issue829801)
http://gwt-code-reviews.appspot.com/829801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r8690 committed - Fix handling of timezone when parsing dates....
Revision: 8690 Author: j...@google.com Date: Wed Sep 1 11:41:22 2010 Log: Fix handling of timezone when parsing dates. Patch by: jat Review by: chovanec http://code.google.com/p/google-web-toolkit/source/detail?r=8690 Modified: /trunk/user/src/com/google/gwt/i18n/client/DateTimeFormat.java /trunk/user/src/com/google/gwt/i18n/client/impl/DateRecord.java /trunk/user/test/com/google/gwt/i18n/client/DateTimeFormat_en_Test.java === --- /trunk/user/src/com/google/gwt/i18n/client/DateTimeFormat.java Mon Jul 26 07:12:53 2010 +++ /trunk/user/src/com/google/gwt/i18n/client/DateTimeFormat.java Wed Sep 1 11:41:22 2010 @@ -1587,7 +1587,7 @@ * @param text the string that need to be parsed * @param start the character position in "text" where parsing should start * @param date the date object that will hold parsed value - * @param strict true to be strict when parsingm false to be lenient + * @param strict true to be strict when parsing, false to be lenient * * @return 0 if parsing failed, otherwise the number of characters advanced */ === --- /trunk/user/src/com/google/gwt/i18n/client/impl/DateRecord.java Mon Jun 7 12:20:31 2010 +++ /trunk/user/src/com/google/gwt/i18n/client/impl/DateRecord.java Wed Sep 1 11:41:22 2010 @@ -183,13 +183,6 @@ return false; } } - -// Adjust time zone. -if (this.tzOffset > Integer.MIN_VALUE) { - int offset = date.getTimezoneOffset(); - date.setTime(date.getTime() + (this.tzOffset - offset) * 60 * 1000); - // HBJ date.setTime(date.getTime() + this.tzOffset * 60 * 1000); -} // Resolve ambiguous year if needed. if (this.ambiguousYear) { // the two-digit year == the default start year @@ -226,6 +219,14 @@ } } } + +// Adjust time zone. +if (this.tzOffset > Integer.MIN_VALUE) { + int offset = date.getTimezoneOffset(); + date.setTime(date.getTime() + (this.tzOffset - offset) * 60 * 1000); + // HBJ date.setTime(date.getTime() + this.tzOffset * 60 * 1000); +} + return true; } === --- /trunk/user/test/com/google/gwt/i18n/client/DateTimeFormat_en_Test.java Mon Jul 26 07:12:53 2010 +++ /trunk/user/test/com/google/gwt/i18n/client/DateTimeFormat_en_Test.java Wed Sep 1 11:41:22 2010 @@ -90,6 +90,22 @@ assertEquals("10/29/2006 01:00:00 PST", DateTimeFormat.getFormat( "MM/dd/ HH:mm:ss z").format(date, usPacific)); } + + public void test_MMMddHHmmsszzzyy() { +DateTimeFormat dtf = DateTimeFormat.getFormat("EEE MMM dd HH:mm:ss zzz "); +Date date = dtf.parse("Mon Aug 30 00:45:00 GMT 2010"); +assertEquals(45, (date.getHours() * 60 + date.getMinutes() ++ date.getTimezoneOffset()) % 1440); +date = dtf.parse("Mon Aug 30 01:45:00 GMT 2010"); +assertEquals(105, (date.getHours() * 60 + date.getMinutes() ++ date.getTimezoneOffset()) % 1440); +date = dtf.parse("Mon Aug 30 06:45:00 GMT 2010"); +assertEquals(405, (date.getHours() * 60 + date.getMinutes() ++ date.getTimezoneOffset()) % 1440); +date = dtf.parse("Mon Aug 30 07:45:00 GMT 2010"); +assertEquals(465, (date.getHours() * 60 + date.getMinutes() ++ date.getTimezoneOffset()) % 1440); + } public void test_MMMddyy() { Date date = new Date(2006 - 1900, 6, 27, 13, 10, 10); -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r8689 committed - Cosmetic changes in safehtml package....
Revision: 8689 Author: x...@google.com Date: Wed Sep 1 10:49:54 2010 Log: Cosmetic changes in safehtml package. Run SafeHtmlBuilderTest both as a GWT and a JRE test. Review at http://gwt-code-reviews.appspot.com/821801 http://code.google.com/p/google-web-toolkit/source/detail?r=8689 Added: /trunk/user/test/com/google/gwt/safehtml/shared/GwtSafeHtmlBuilderTest.java Modified: /trunk/user/src/com/google/gwt/safehtml/shared/SafeHtmlBuilder.java /trunk/user/test/com/google/gwt/safehtml/SafeHtmlGwtSuite.java /trunk/user/test/com/google/gwt/safehtml/SafeHtmlJreSuite.java /trunk/user/test/com/google/gwt/safehtml/shared/GwtSafeHtmlUtilsTest.java /trunk/user/test/com/google/gwt/safehtml/shared/SafeHtmlBuilderTest.java === --- /dev/null +++ /trunk/user/test/com/google/gwt/safehtml/shared/GwtSafeHtmlBuilderTest.java Wed Sep 1 10:49:54 2010 @@ -0,0 +1,53 @@ +/* + * Copyright 2008 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.safehtml.shared; + +import com.google.gwt.junit.client.GWTTestCase; + +/** + * Unit tests for {...@link SafeHtmlBuilder}. + */ +public class GwtSafeHtmlBuilderTest extends GWTTestCase { + + private static final String FOOBARBAZ_HTML = "foobarbaz"; + + public void testEmpty() { +SafeHtmlBuilder b = new SafeHtmlBuilder(); +assertEquals("", b.toSafeHtml().asString()); + } + + public void testFromSafeHtml() { +SafeHtml html = SafeHtmlUtils.fromSafeConstant(FOOBARBAZ_HTML); +SafeHtmlBuilder b = new SafeHtmlBuilder().append(html); +assertEquals(FOOBARBAZ_HTML, b.toSafeHtml().asString()); + } + + public void testAppend() { +SafeHtml html = SafeHtmlUtils.fromSafeConstant(FOOBARBAZ_HTML); +SafeHtmlBuilder b = new SafeHtmlBuilder().appendHtmlConstant( +"Yabba dabba & doo\n").appendEscaped("What's up so&so\n").append( +html); + +String expected = "Yabba dabba & doo\n" + "What's up so&so\n" ++ FOOBARBAZ_HTML; +assertEquals(expected, b.toSafeHtml().asString()); + } + + @Override + public String getModuleName() { +return "com.google.gwt.safehtml.SafeHtmlTestsModule"; + } +} === --- /trunk/user/src/com/google/gwt/safehtml/shared/SafeHtmlBuilder.java Mon Aug 23 04:03:59 2010 +++ /trunk/user/src/com/google/gwt/safehtml/shared/SafeHtmlBuilder.java Wed Sep 1 10:49:54 2010 @@ -78,11 +78,11 @@ /** * Appends the string representation of a char. * - * @param num the number whose string representation to append + * @param c the character whose string representation to append * @return a reference to this object */ - public SafeHtmlBuilder append(char num) { -sb.append(num); + public SafeHtmlBuilder append(char c) { +sb.append(c); return this; } === --- /trunk/user/test/com/google/gwt/safehtml/SafeHtmlGwtSuite.java Fri Aug 27 03:13:26 2010 +++ /trunk/user/test/com/google/gwt/safehtml/SafeHtmlGwtSuite.java Wed Sep 1 10:49:54 2010 @@ -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 @@ -17,8 +17,9 @@ import com.google.gwt.junit.tools.GWTTestSuite; import com.google.gwt.safehtml.client.SafeHtmlTemplatesTest; +import com.google.gwt.safehtml.shared.GwtSafeHtmlBuilderTest; +import com.google.gwt.safehtml.shared.GwtSafeHtmlStringTest; import com.google.gwt.safehtml.shared.GwtSafeHtmlUtilsTest; -import com.google.gwt.safehtml.shared.SafeHtmlStringTest; import junit.framework.Test; @@ -29,14 +30,15 @@ public static Test suite() { GWTTestSuite suite = new GWTTestSuite( "Test suite for SafeHtml GWTTestCases"); - + suite.addTestSuite(GwtSafeHtmlUtilsTest.class); -suite.addTestSuite(SafeHtmlStringTest.class); +suite.addTestSuite(GwtSafeHtmlStringTest.class); +suite.addTestSuite(GwtSafeHtmlBuilderTest.class); suite.addTestSuite(SafeHtmlTemplatesTest.class); return suite; } - + private S
[gwt-contrib] Re: RR : Initial add of generator for RequestFactoryEditorDriver (issue823801)
LGTM http://gwt-code-reviews.appspot.com/823801/diff/2001/3020 File user/src/com/google/gwt/editor/client/LeafValueEditor.java (right): http://gwt-code-reviews.appspot.com/823801/diff/2001/3020#newcode23 user/src/com/google/gwt/editor/client/LeafValueEditor.java:23: public interface LeafValueEditor extends Editor { Fine with me. On 2010/09/01 20:13:07, bobv wrote: On 2010/09/01 18:14:31, rjrjr wrote: > Should this extend TakesValue as well? Then it has no new methods to declare. Can TakesValue be moved outside of the user.client.ui package? http://gwt-code-reviews.appspot.com/823801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Use SafeHtml for Cell widgets (issue776804)
LGTM http://gwt-code-reviews.appspot.com/776804/diff/55001/56028 File user/src/com/google/gwt/cell/client/SafeHtmlCell.java (right): http://gwt-code-reviews.appspot.com/776804/diff/55001/56028#newcode51 user/src/com/google/gwt/cell/client/SafeHtmlCell.java:51: public void render(SafeHtml value, Object key, SafeHtmlBuilder sb) { protected http://gwt-code-reviews.appspot.com/776804/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: RR : Initial add of generator for RequestFactoryEditorDriver (issue823801)
Updated with feedback. Most of the new code has been moved into the requestfactory package. TakesValue really should be outside of the user.client.ui package. Any objections to moving it into the user.client package? http://gwt-code-reviews.appspot.com/823801/diff/2001/3002 File samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/PersonEditorWorkflow.java (right): http://gwt-code-reviews.appspot.com/823801/diff/2001/3002#newcode57 samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/PersonEditorWorkflow.java:57: static void register(EventBus eventBus, Shouldn't this method return a HandlerRegistration that can tear everything down, and shouldn't you call it when your dialog goes away? This method is called exactly once from the DynaTableRf EntryPoint. I could make it return the registration, but there's no point, since it would never be unregistered. http://gwt-code-reviews.appspot.com/823801/diff/2001/3020 File user/src/com/google/gwt/editor/client/LeafValueEditor.java (right): http://gwt-code-reviews.appspot.com/823801/diff/2001/3020#newcode23 user/src/com/google/gwt/editor/client/LeafValueEditor.java:23: public interface LeafValueEditor extends Editor { On 2010/09/01 18:14:31, rjrjr wrote: Should this extend TakesValue as well? Then it has no new methods to declare. Can TakesValue be moved outside of the user.client.ui package? http://gwt-code-reviews.appspot.com/823801/diff/2001/3026 File user/src/com/google/gwt/editor/client/impl/AbstractRequestFactoryEditorDelegate.java (right): http://gwt-code-reviews.appspot.com/823801/diff/2001/3026#newcode93 user/src/com/google/gwt/editor/client/impl/AbstractRequestFactoryEditorDelegate.java:93: valueAwareEditor = (ValueAwareEditor) editor; On 2010/09/01 18:14:31, rjrjr wrote: I've been getting into the habit of isolating such casts into one line methods, to narrow the scope of the @SuppressWarnings. FWIW Done. http://gwt-code-reviews.appspot.com/823801/diff/2001/3028 File user/src/com/google/gwt/editor/client/impl/RequestFactoryEditorDelegate.java (right): http://gwt-code-reviews.appspot.com/823801/diff/2001/3028#newcode31 user/src/com/google/gwt/editor/client/impl/RequestFactoryEditorDelegate.java:31: public interface RequestFactoryEditorDelegate> On 2010/09/01 18:14:31, rjrjr wrote: Is this interface really buying you anything that you don't already get from the abstract class? Removed the interface. http://gwt-code-reviews.appspot.com/823801/diff/2001/3030 File user/src/com/google/gwt/editor/rebind/EditorAccess.java (right): http://gwt-code-reviews.appspot.com/823801/diff/2001/3030#newcode58 user/src/com/google/gwt/editor/rebind/EditorAccess.java:58: * TODO: Do we need this? On 2010/09/01 18:14:31, rjrjr wrote: If you're not actually using it yet, I'd snip it. Easy enough to restore when you do use it, and you don't have to remember to snip it later. Done. http://gwt-code-reviews.appspot.com/823801/diff/2001/3032 File user/src/com/google/gwt/editor/rebind/EditorModel.java (right): http://gwt-code-reviews.appspot.com/823801/diff/2001/3032#newcode41 user/src/com/google/gwt/editor/rebind/EditorModel.java:41: public class EditorModel extends RequestFactoryEditorDriverGenerator { On 2010/09/01 18:14:31, rjrjr wrote: This is a bizarre inheritance chain. Or is it just a bizarre class name? Done. http://gwt-code-reviews.appspot.com/823801/diff/2001/3032#newcode46 user/src/com/google/gwt/editor/rebind/EditorModel.java:46: static JClassType calculateEditedType(JClassType editorType) { On 2010/09/01 18:14:31, rjrjr wrote: Could you revisit your asserts and make sure none of them are really user errors? Updated the doc and added an assert to specify that it is an error to call the method with a type not assignable to Editor. http://gwt-code-reviews.appspot.com/823801/diff/2001/3032#newcode315 user/src/com/google/gwt/editor/rebind/EditorModel.java:315: private String[] findBeanPropertyMethods(String path, JClassType propertyType) On 2010/09/01 18:14:31, rjrjr wrote: Any chance of sharing com.google.gwt.uibinder.rebind.model.OwnerFieldClass.findSetters(JClassType)? Clarified the documentation to indicate that this method also creates an interstitial getter expression. http://gwt-code-reviews.appspot.com/823801/diff/2001/3033 File user/src/com/google/gwt/editor/rebind/RequestFactoryEditorDriverGenerator.java (right): http://gwt-code-reviews.appspot.com/823801/diff/2001/3033#newcode39 user/src/com/google/gwt/editor/rebind/RequestFactoryEditorDriverGenerator.java:39: private static void println(SourceWriter sw, String fmt, Object... args) { On 2010/09/01 18:14:31, rjrjr wrote: Forgive me for expanding scope, but could you go ahead and make this an overload on SourceWriter? I'm so tired of re-writing it. Done. http://gwt-code-reviews.appspot.com/823801/diff/2001/3033#newcode55 user/src/com/google/gwt/editor/rebind/RequestFactoryEditorDriverGenerator.java:55: assert toGenerate != null : typ
[gwt-contrib] Add SafeHtml support to ui widgets. (issue829801)
Reviewers: jlabanca, Description: Add SafeHtml support to ui widgets. This is a first-pass at adding SafeHtml support to a subset of the widgets. In cases where the class implements HasHTML, HasSafeHtml has been implemented as well. In constructors that accept a string that can be parsed as Html, a SafeHtml constructor has been added. In cases where a method accepts a string that can be parsed as Html, a corresponding SafeHtml method has been added. Review by: jlaba...@google.com Please review this at http://gwt-code-reviews.appspot.com/829801/show Affected files: M tools/api-checker/config/gwt20_21userApi.conf M user/src/com/google/gwt/user/User.gwt.xml M user/src/com/google/gwt/user/client/ui/HTML.java M user/src/com/google/gwt/user/client/ui/InlineHTML.java M user/src/com/google/gwt/user/client/ui/MenuBar.java M user/src/com/google/gwt/user/client/ui/MenuItem.java M user/src/com/google/gwt/user/client/ui/RadioButton.java M user/test/com/google/gwt/user/UISuite.java M user/test/com/google/gwt/user/client/ui/HTMLPanelTest.java M user/test/com/google/gwt/user/client/ui/HTMLTest.java A user/test/com/google/gwt/user/client/ui/InlineHTMLTest.java M user/test/com/google/gwt/user/client/ui/MenuBarTest.java M user/test/com/google/gwt/user/client/ui/MenuItemTest.java M user/test/com/google/gwt/user/client/ui/RadioButtonTest.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Uibinder parser api
Sorry, still not public. However, we're landing a patch that will eliminate a lot of the need for it: http://gwt-code-reviews.appspot.com/794801 On Wed, Sep 1, 2010 at 12:45 PM, Johan Rydberg wrote: > I haven't checked m3 yet, but will the parser API be public in 2.1? It's > the one thing that would make it perfect. > > Sent from my iPhone > > -- > http://groups.google.com/group/Google-Web-Toolkit-Contributors > -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Uibinder parser api
I haven't checked m3 yet, but will the parser API be public in 2.1? It's the one thing that would make it perfect. Sent from my iPhone -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r8688 committed - Add note about RegExp.split browser inconsistencies....
Revision: 8688 Author: p...@google.com Date: Wed Sep 1 09:36:27 2010 Log: Add note about RegExp.split browser inconsistencies. Review by: j...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=8688 Modified: /trunk/user/src/com/google/gwt/regexp/shared/RegExp.java === --- /trunk/user/src/com/google/gwt/regexp/shared/RegExp.java Mon Jun 7 12:20:31 2010 +++ /trunk/user/src/com/google/gwt/regexp/shared/RegExp.java Wed Sep 1 09:36:27 2010 @@ -323,6 +323,10 @@ * constituent characters. If the regular expression is not empty but matches * an empty string, the results are not well defined. * + * Note: There are some browser inconsistencies with this implementation, as + * it is delegated to the browser, and no browser follows the spec completely. + * A major difference is that IE will exclude empty strings in the result. + * * @param input the string to be split. * @param limit the the maximum number of strings to split off and return, *ignoring the rest of the input string. If negative, there is no -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Adding support for Direction.LINE_START/END to DockLayoutPanel and SplitLayoutPanel. (issue828801)
http://gwt-code-reviews.appspot.com/828801/diff/1/4 File user/src/com/google/gwt/user/client/ui/DockLayoutPanel.java (left): http://gwt-code-reviews.appspot.com/828801/diff/1/4#oldcode401 user/src/com/google/gwt/user/client/ui/DockLayoutPanel.java:401: double left = 0, top = 0, right = 0, bottom = 0; Eclipse refused to auto format the file when this line was present, so I broke it up into multiple lines. http://gwt-code-reviews.appspot.com/828801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Adding support for Direction.LINE_START/END to DockLayoutPanel and SplitLayoutPanel. (issue828801)
Reviewers: jgw, Description: Adding support for Direction.LINE_START/END to DockLayoutPanel and SplitLayoutPanel. Please review this at http://gwt-code-reviews.appspot.com/828801/show Affected files: M user/src/com/google/gwt/uibinder/elementparsers/DockLayoutPanelParser.java M user/src/com/google/gwt/user/cellview/client/CellBrowser.java M user/src/com/google/gwt/user/client/ui/DockLayoutPanel.java M user/src/com/google/gwt/user/client/ui/SplitLayoutPanel.java M user/test/com/google/gwt/user/UISuite.java A user/test/com/google/gwt/user/client/ui/DockLayoutPanelTest.java A user/test/com/google/gwt/user/client/ui/DockLayoutPanelTestRtl.java M user/test/com/google/gwt/user/client/ui/SplitLayoutPanelTest.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Use SafeHtml for Cell widgets (issue776804)
http://gwt-code-reviews.appspot.com/776804/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: RR : Initial add of generator for RequestFactoryEditorDriver (issue823801)
Should you add the change to make HasText extend TakesValue? http://gwt-code-reviews.appspot.com/823801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: RR : Initial add of generator for RequestFactoryEditorDriver (issue823801)
http://gwt-code-reviews.appspot.com/823801/diff/2001/3002 File samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/PersonEditorWorkflow.java (right): http://gwt-code-reviews.appspot.com/823801/diff/2001/3002#newcode57 samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/PersonEditorWorkflow.java:57: static void register(EventBus eventBus, Shouldn't this method return a HandlerRegistration that can tear everything down, and shouldn't you call it when your dialog goes away? http://gwt-code-reviews.appspot.com/823801/diff/2001/3020 File user/src/com/google/gwt/editor/client/LeafValueEditor.java (right): http://gwt-code-reviews.appspot.com/823801/diff/2001/3020#newcode23 user/src/com/google/gwt/editor/client/LeafValueEditor.java:23: public interface LeafValueEditor extends Editor { Should this extend TakesValue as well? Then it has no new methods to declare. http://gwt-code-reviews.appspot.com/823801/diff/2001/3026 File user/src/com/google/gwt/editor/client/impl/AbstractRequestFactoryEditorDelegate.java (right): http://gwt-code-reviews.appspot.com/823801/diff/2001/3026#newcode93 user/src/com/google/gwt/editor/client/impl/AbstractRequestFactoryEditorDelegate.java:93: valueAwareEditor = (ValueAwareEditor) editor; I've been getting into the habit of isolating such casts into one line methods, to narrow the scope of the @SuppressWarnings. FWIW http://gwt-code-reviews.appspot.com/823801/diff/2001/3028 File user/src/com/google/gwt/editor/client/impl/RequestFactoryEditorDelegate.java (right): http://gwt-code-reviews.appspot.com/823801/diff/2001/3028#newcode31 user/src/com/google/gwt/editor/client/impl/RequestFactoryEditorDelegate.java:31: public interface RequestFactoryEditorDelegate> Is this interface really buying you anything that you don't already get from the abstract class? http://gwt-code-reviews.appspot.com/823801/diff/2001/3030 File user/src/com/google/gwt/editor/rebind/EditorAccess.java (right): http://gwt-code-reviews.appspot.com/823801/diff/2001/3030#newcode58 user/src/com/google/gwt/editor/rebind/EditorAccess.java:58: * TODO: Do we need this? If you're not actually using it yet, I'd snip it. Easy enough to restore when you do use it, and you don't have to remember to snip it later. http://gwt-code-reviews.appspot.com/823801/diff/2001/3032 File user/src/com/google/gwt/editor/rebind/EditorModel.java (right): http://gwt-code-reviews.appspot.com/823801/diff/2001/3032#newcode41 user/src/com/google/gwt/editor/rebind/EditorModel.java:41: public class EditorModel extends RequestFactoryEditorDriverGenerator { This is a bizarre inheritance chain. Or is it just a bizarre class name? http://gwt-code-reviews.appspot.com/823801/diff/2001/3032#newcode46 user/src/com/google/gwt/editor/rebind/EditorModel.java:46: static JClassType calculateEditedType(JClassType editorType) { Could you revisit your asserts and make sure none of them are really user errors? http://gwt-code-reviews.appspot.com/823801/diff/2001/3032#newcode315 user/src/com/google/gwt/editor/rebind/EditorModel.java:315: private String[] findBeanPropertyMethods(String path, JClassType propertyType) Any chance of sharing com.google.gwt.uibinder.rebind.model.OwnerFieldClass.findSetters(JClassType)? http://gwt-code-reviews.appspot.com/823801/diff/2001/3033 File user/src/com/google/gwt/editor/rebind/RequestFactoryEditorDriverGenerator.java (right): http://gwt-code-reviews.appspot.com/823801/diff/2001/3033#newcode39 user/src/com/google/gwt/editor/rebind/RequestFactoryEditorDriverGenerator.java:39: private static void println(SourceWriter sw, String fmt, Object... args) { Forgive me for expanding scope, but could you go ahead and make this an overload on SourceWriter? I'm so tired of re-writing it. http://gwt-code-reviews.appspot.com/823801/diff/2001/3033#newcode55 user/src/com/google/gwt/editor/rebind/RequestFactoryEditorDriverGenerator.java:55: assert toGenerate != null : typeName + " is not an interface type"; Shouldn't use an assert for a user error, should throw an UnableToComplete and log this. http://gwt-code-reviews.appspot.com/823801/diff/2001/3033#newcode86 user/src/com/google/gwt/editor/rebind/RequestFactoryEditorDriverGenerator.java:86: editor.getQualifiedBinaryName()).replace("_", "_1").replace('$', '_') Do we really need the entire package name in the class name? Never liked that about ClientBundle. http://gwt-code-reviews.appspot.com/823801/diff/2001/3033#newcode103 user/src/com/google/gwt/editor/rebind/RequestFactoryEditorDriverGenerator.java:103: * being editor. This decreases casting over having a generic field in the "being edited." http://gwt-code-reviews.appspot.com/823801/diff/2001/3034 File user/test/com/google/gwt/editor/EditorSuite.gwt.xml (right): http://gwt-code-reviews.appspot.com/823801/diff/2001/3034#newcode3 user/test/com/google/gwt/editor/EditorSuite.gwt.xml:3: Are you painting yourself into any corners here? Will we be able to refactor later to decouple Editor from RequestFactory? htt
Re: [gwt-contrib] expenses sample POM file
They don't conflict. On Wed, Sep 1, 2010 at 10:47 AM, Travis Camechis wrote: > Will you be able to use both RequestFactory and RPC at the same time? For > example using some third party API's may still require RPC. > > > On Mon, Aug 30, 2010 at 10:57 AM, Ray Ryan wrote: > >> It was probably a premature move, though the sample will likely require >> Roo trunk pretty soon. In the meantime, does it work okay if you bump the >> requirement down to Roo 1.1M3? >> >> rjrjr >> >> On Aug 28, 2010 7:45 AM, "tc" wrote: >> > Commit r8664 updated the expenses sample to use the Roo 1.1M4 >> > annotations jar which does not exist in the maven repos. The only way >> > to get that jar currently is to build roo and doing a manual import >> > into a local maven repo? Is this the intent or should it be fixed? >> > >> > -- >> > http://groups.google.com/group/Google-Web-Toolkit-Contributors >> >> -- >> http://groups.google.com/group/Google-Web-Toolkit-Contributors > > > -- > http://groups.google.com/group/Google-Web-Toolkit-Contributors > -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] expenses sample POM file
Will you be able to use both RequestFactory and RPC at the same time? For example using some third party API's may still require RPC. On Mon, Aug 30, 2010 at 10:57 AM, Ray Ryan wrote: > It was probably a premature move, though the sample will likely require Roo > trunk pretty soon. In the meantime, does it work okay if you bump the > requirement down to Roo 1.1M3? > > rjrjr > > On Aug 28, 2010 7:45 AM, "tc" wrote: > > Commit r8664 updated the expenses sample to use the Roo 1.1M4 > > annotations jar which does not exist in the maven repos. The only way > > to get that jar currently is to build roo and doing a manual import > > into a local maven repo? Is this the intent or should it be fixed? > > > > -- > > http://groups.google.com/group/Google-Web-Toolkit-Contributors > > -- > http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fixing a bug in various selection models where calling isSelected() prevents a SelectionChange e... (issue819802)
committed as r8687 http://gwt-code-reviews.appspot.com/819802/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Addresses various issues with PlaceHistoryHandlerGenerator (issue827801)
Reviewers: , Description: This is a major refactor of PlaceHistoryHandlerGenerator/PlaceHistoryGeneratorContext to address various issues with the current implementation: - place types should be ordered from most-derived to least-derived in the generated getPrefixAndToken (see https://jira.springsource.org/browse/ROO-1296 ) - inherited non-overridable methods (final) on the factory are ignored (see: https://jira.springsource.org/browse/ROO-1297 ) - prefixes containing colons should make the build fail (see: https://jira.springsource.org/browse/ROO-1333 ) - places or place tokenizers with same simple name but living in different package produced uncompilable code (just replaced imports with qualified source name) - build now fails when it finds two place tokenizers for the same place type It also correctly escapes generated string literals, in the unlikely case a prefix contains a Java special char (e.g. \ or "). It's desperately in needs of more unit tests, but I at least ensured the existing ones don't break. As you read this, I'm probably already working on adding some. Finally, the algorithm for finding all "factory methods" could be moved into JClassType, and improved to take as a parameter the calling class, so default-access (and protected) methods are correctly listed/excluded depending on the calling class's package (the algorithm would likely need to deal with nested/inner classes being able to call private methods though, so I left it here, very specialized for this generator's needs) Please review this at http://gwt-code-reviews.appspot.com/827801/show Affected files: user/src/com/google/gwt/app/rebind/PlaceHistoryGeneratorContext.java user/src/com/google/gwt/app/rebind/PlaceHistoryHandlerGenerator.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r8687 committed - Fixing a bug in various selection models where calling isSelected() pr...
Revision: 8687 Author: jlaba...@google.com Date: Wed Sep 1 07:18:10 2010 Log: Fixing a bug in various selection models where calling isSelected() prevents a SelectionChange event from firing because we cancel the event when we call resolveChanges(). This patch fires the event from resolveChanges(), so if the user calls isSelected(), the event fires immediately. Review at http://gwt-code-reviews.appspot.com/819802 Review by: r...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=8687 Modified: /trunk/user/src/com/google/gwt/view/client/DefaultSelectionModel.java /trunk/user/src/com/google/gwt/view/client/MultiSelectionModel.java /trunk/user/src/com/google/gwt/view/client/SingleSelectionModel.java /trunk/user/test/com/google/gwt/view/client/AbstractSelectionModelTest.java === --- /trunk/user/src/com/google/gwt/view/client/DefaultSelectionModel.java Wed Aug 11 09:22:23 2010 +++ /trunk/user/src/com/google/gwt/view/client/DefaultSelectionModel.java Wed Sep 1 07:18:10 2010 @@ -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 @@ -31,8 +31,8 @@ * * @param the data type of records in the list */ -public abstract class DefaultSelectionModel extends -AbstractSelectionModel { +public abstract class DefaultSelectionModel extends AbstractSelectionModel< +T> { private final Map exceptions = new HashMapBoolean>(); @@ -88,10 +88,7 @@ if (isEventScheduled()) { setEventCancelled(true); } - -if (resolveChanges()) { - SelectionChangeEvent.fire(this); -} +resolveChanges(); } /** @@ -106,7 +103,7 @@ return output; } - private boolean resolveChanges() { + private void resolveChanges() { boolean changed = false; for (Map.Entry entry : selectionChanges.entrySet()) { T object = entry.getKey(); @@ -131,6 +128,10 @@ } selectionChanges.clear(); -return changed; + +// Fire a selection change event. +if (changed) { + SelectionChangeEvent.fire(this); +} } } === --- /trunk/user/src/com/google/gwt/view/client/MultiSelectionModel.java Fri Aug 6 06:29:40 2010 +++ /trunk/user/src/com/google/gwt/view/client/MultiSelectionModel.java Wed Sep 1 07:18:10 2010 @@ -35,7 +35,7 @@ // Ensure one value per key private final HashMap selectedSet = new HashMap(); - + private final HashMap selectionChanges = new HashMapBoolean>(); /** @@ -57,23 +57,20 @@ selectionChanges.put(object, selected); scheduleSelectionChangeEvent(); } - + @Override protected void fireSelectionChangeEvent() { if (isEventScheduled()) { setEventCancelled(true); } - -if (resolveChanges()) { - SelectionChangeEvent.fire(this); -} +resolveChanges(); } - private boolean resolveChanges() { + private void resolveChanges() { if (selectionChanges.isEmpty()) { - return false; -} - + return; +} + boolean changed = false; for (Map.Entry entry : selectionChanges.entrySet()) { T object = entry.getKey(); @@ -94,6 +91,10 @@ } } selectionChanges.clear(); -return changed; + +// Fire a selection change event. +if (changed) { + SelectionChangeEvent.fire(this); +} } } === --- /trunk/user/src/com/google/gwt/view/client/SingleSelectionModel.java Fri Aug 6 06:29:40 2010 +++ /trunk/user/src/com/google/gwt/view/client/SingleSelectionModel.java Wed Sep 1 07:18:10 2010 @@ -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 @@ -19,11 +19,11 @@ /** * A simple selection model that allows only one object to be selected a a time. - * + * * * Note: This class is new and its interface subject to change. * - * + * * @param the record data type */ public class SingleSelectionModel extends AbstractSelectionModel { @@ -56,23 +56,20 @@ newSelected = selected; scheduleSelectionChangeEvent(); } -
[gwt-contrib] Re: Fixing a bug in various selection models where calling isSelected() prevents a SelectionChange e... (issue819802)
LGTM encore On Wed, Sep 1, 2010 at 9:19 AM, wrote: > I verified DynaTableRf and Expenses all work. > > I can't test against the generated Scaffold app because Scaffold still > references com.google.gwt.valuestore, but that has been merged into > com.google.gwt.requestfactory, so the app doesn't compile. My changes > should have any effect on the app though. Huh? That's not true. But if the others okay it should be okay too. > > > > http://gwt-code-reviews.appspot.com/819802/diff/1/2 > File user/src/com/google/gwt/view/client/DefaultSelectionModel.java > (right): > > http://gwt-code-reviews.appspot.com/819802/diff/1/2#newcode37 > user/src/com/google/gwt/view/client/DefaultSelectionModel.java:37: > private final Map exceptions = new HashMap< > On 2010/09/01 00:19:25, rice wrote: > >> Bogus wrapping? >> > > Done. > > > http://gwt-code-reviews.appspot.com/819802/diff/1/2#newcode41 > user/src/com/google/gwt/view/client/DefaultSelectionModel.java:41: > private final HashMap selectionChanges = new HashMap< > On 2010/09/01 00:19:25, rice wrote: > >> Bogus wrapping? >> > > Done. > > > http://gwt-code-reviews.appspot.com/819802/diff/1/3 > File user/src/com/google/gwt/view/client/MultiSelectionModel.java > (right): > > http://gwt-code-reviews.appspot.com/819802/diff/1/3#newcode39 > user/src/com/google/gwt/view/client/MultiSelectionModel.java:39: private > final HashMap selectionChanges = new HashMap< > On 2010/09/01 00:19:25, rice wrote: > >> Bogus wrapping? >> > > Done. > > > http://gwt-code-reviews.appspot.com/819802/show > -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fixing a bug in various selection models where calling isSelected() prevents a SelectionChange e... (issue819802)
I verified DynaTableRf and Expenses all work. I can't test against the generated Scaffold app because Scaffold still references com.google.gwt.valuestore, but that has been merged into com.google.gwt.requestfactory, so the app doesn't compile. My changes should have any effect on the app though. http://gwt-code-reviews.appspot.com/819802/diff/1/2 File user/src/com/google/gwt/view/client/DefaultSelectionModel.java (right): http://gwt-code-reviews.appspot.com/819802/diff/1/2#newcode37 user/src/com/google/gwt/view/client/DefaultSelectionModel.java:37: private final Map exceptions = new HashMap< On 2010/09/01 00:19:25, rice wrote: Bogus wrapping? Done. http://gwt-code-reviews.appspot.com/819802/diff/1/2#newcode41 user/src/com/google/gwt/view/client/DefaultSelectionModel.java:41: private final HashMap selectionChanges = new HashMap< On 2010/09/01 00:19:25, rice wrote: Bogus wrapping? Done. http://gwt-code-reviews.appspot.com/819802/diff/1/3 File user/src/com/google/gwt/view/client/MultiSelectionModel.java (right): http://gwt-code-reviews.appspot.com/819802/diff/1/3#newcode39 user/src/com/google/gwt/view/client/MultiSelectionModel.java:39: private final HashMap selectionChanges = new HashMap< On 2010/09/01 00:19:25, rice wrote: Bogus wrapping? Done. http://gwt-code-reviews.appspot.com/819802/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Adding the validation library to the DynaTableRf and Validation classpath to resolve missing dep... (issue826801)
Reviewers: cramsdale, Description: Adding the validation library to the DynaTableRf and Validation classpath to resolve missing dependencies. Also adding a marker to the classes folder in both samples so eclipse has a place to put class files. Please review this at http://gwt-code-reviews.appspot.com/826801/show Affected files: M eclipse/samples/DynaTableRf/.classpath M eclipse/samples/Validation/.classpath A samples/dynatablerf/war/WEB-INF/classes/marker A samples/validation/war/WEB-INF/classes/marker Index: eclipse/samples/DynaTableRf/.classpath === --- eclipse/samples/DynaTableRf/.classpath (revision 8686) +++ eclipse/samples/DynaTableRf/.classpath (working copy) @@ -4,5 +4,8 @@ path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + path="GWT_TOOLS/lib/javax/validation/validation-api-1.0.0.GA.jar" sourcepath="/GWT_TOOLS/lib/javax/validation/validation-api-1.0.0.GA-sources.jar"/> + path="GWT_TOOLS/lib/javax/validation/validation-api-1.0.0.GA-sources.jar"/> + path="GWT_TOOLS/redist/json/r2_20080312/json.jar"/> Index: eclipse/samples/Validation/.classpath === --- eclipse/samples/Validation/.classpath (revision 8686) +++ eclipse/samples/Validation/.classpath (working copy) @@ -4,5 +4,7 @@ path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + path="GWT_TOOLS/lib/javax/validation/validation-api-1.0.0.GA-sources.jar"/> + path="GWT_TOOLS/lib/javax/validation/validation-api-1.0.0.GA.jar" sourcepath="/GWT_TOOLS/lib/javax/validation/validation-api-1.0.0.GA-sources.jar"/> Index: samples/dynatablerf/war/WEB-INF/classes/marker === --- samples/dynatablerf/war/WEB-INF/classes/marker (revision 0) +++ samples/dynatablerf/war/WEB-INF/classes/marker (revision 0) Index: samples/validation/war/WEB-INF/classes/marker === --- samples/validation/war/WEB-INF/classes/marker (revision 0) +++ samples/validation/war/WEB-INF/classes/marker (revision 0) -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Ignore negative times after normalization (issue825801)
lgtm http://gwt-code-reviews.appspot.com/825801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Ignore negative times after normalization (issue825801)
Reviewers: knorton, zundel, conroy, Description: This patch moves the guard to Ignore negative times to be after after normalization. Negative times are a product of out of order events coming from webcore. Please review this at http://gwt-code-reviews.appspot.com/825801/show Affected files: client/ui/src/com/google/speedtracer/client/model/DevToolsDataInstance.java Index: client/ui/src/com/google/speedtracer/client/model/DevToolsDataInstance.java === --- client/ui/src/com/google/speedtracer/client/model/DevToolsDataInstance.java (revision 320) +++ client/ui/src/com/google/speedtracer/client/model/DevToolsDataInstance.java (working copy) @@ -182,6 +182,15 @@ */ private void forwardToDataInstance(EventRecord record) { assert (!Double.isNaN(record.getTime())) : "Time was not normalized!"; + + // TODO(jaimeyap/knorton): Remove this hack. + // Workaround for http://code.google.com/p/speedtracer/issues/detail?id=29 + // WebKit sometimes delivers timeline records with a negative timestamp. + // We simply discard these until this issue can be resolved upstream. + if (record.getTime() < 0) { +return; + } + previousEvent = record.cast(); dataInstance.onEventRecord(record); } @@ -220,14 +229,6 @@ private void onTimeLineRecord(UnNormalizedEventRecord record) { assert (dataInstance != null) : "Someone called invoke that wasn't our connect call!"; - // TODO(knorton): Remove this hack. - // Workaround for http://code.google.com/p/speedtracer/issues/detail?id=29 - // WebKit sometimes delivers timeline records with a negative timestamp. - // We simply discard these until this issue can be resolved upstream. - if (record.getTime() < 0) { -return; - } - record. cast().apply(typeEnsuringVisitor); int type = record.getType(); -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r8686 committed - Updated Eclipse readme to reflect correct checkstyle version....
Revision: 8686 Author: p...@google.com Date: Wed Sep 1 04:21:58 2010 Log: Updated Eclipse readme to reflect correct checkstyle version. Review by: rj...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=8686 Modified: /trunk/eclipse/README.txt === --- /trunk/eclipse/README.txt Tue Oct 13 16:57:19 2009 +++ /trunk/eclipse/README.txt Wed Sep 1 04:21:58 2010 @@ -105,7 +105,7 @@ Checkstyle is used to enforce good programming style. -1. Install Checkstyle version 4.4.2 (newer versions will not work) +1. Install Checkstyle version 4.4.3 (newer versions will not work) The Eclipse Checkstyle plugin can be found at: http://eclipse-cs.sourceforge.net/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Allow a fallback/catch-all and prefix-less PlaceTokenizer & makes Historian pluggable (issue824801)
Reviewers: rjrjr, Description: Fixes https://jira.springsource.org/browse/ROO-1276 First, the anonymous-class implementation of Historian is moved into a public static DefaultHistorian nested class that's GWT.create()d to allow pluggability via a rule in a gwt.xml file (similar to PlaceController.DefaultDelegate; particularly important here as you probably do not use this class directly but rely on the PlaceHistoryHandlerGenerator) Then, the empty-prefix (@Prefix("")) is special-cased to: - not insert the ":" separator when generating tokens - also serve as a fallback/catch-all when parsing tokens I also added an assertion in PrefixAndToken that the prefix is non-null (and that it doesn't contain the separator, which is related to ROO-1333, but only checked at runtime during development so not a proper fix) I'm not very happy with the unit test, as the FallbackPlaceTokenizer is very "special". Maybe rather add a "useFallbackPlaceTokenizer" flag in Subject to turn on/off the use of a simple Tokenizer3, and then test both scenarios: falls back to defaultPlace, or use whatever the fallback tokenizer returns (but it wouldn't then test the case where the tokenizer returns null, as Tokenizer3 alsoways returns a Place3 istance) Please review this at http://gwt-code-reviews.appspot.com/824801/show Affected files: user/src/com/google/gwt/app/place/AbstractPlaceHistoryHandler.java user/test/com/google/gwt/app/place/AbstractPlaceHistoryHandlerTest.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r8685 committed - Setting ValueBox to be LTR by default, and disabling direction estimat...
Revision: 8685 Author: tomer...@google.com Date: Tue Aug 31 20:57:09 2010 Log: Setting ValueBox to be LTR by default, and disabling direction estimation for it. Adding some documentation in TextArea and TextBox. Review at http://gwt-code-reviews.appspot.com/811801 http://code.google.com/p/google-web-toolkit/source/detail?r=8685 Modified: /trunk/user/src/com/google/gwt/user/client/ui/TextArea.java /trunk/user/src/com/google/gwt/user/client/ui/TextBox.java /trunk/user/src/com/google/gwt/user/client/ui/ValueBox.java === --- /trunk/user/src/com/google/gwt/user/client/ui/TextArea.java Sun Jun 20 09:43:54 2010 +++ /trunk/user/src/com/google/gwt/user/client/ui/TextArea.java Tue Aug 31 20:57:09 2010 @@ -32,6 +32,14 @@ * .gwt-TextArea-readonly { dependent style set when the text area is read-only } * * + * + * Built-in Bidi Text Support + * This widget is capable of automatically adjusting its direction according to + * the input text. This feature is controlled by {...@link #setDirectionEstimator}, + * and is available by default when at least one of the application's locales is + * right-to-left. + * + * * * Example {...@example com.google.gwt.examples.TextBoxExample} * === --- /trunk/user/src/com/google/gwt/user/client/ui/TextBox.java Sun Jun 20 09:43:54 2010 +++ /trunk/user/src/com/google/gwt/user/client/ui/TextBox.java Tue Aug 31 20:57:09 2010 @@ -33,6 +33,14 @@ * read-only } * * + * + * Built-in Bidi Text Support + * This widget is capable of automatically adjusting its direction according to + * the input text. This feature is controlled by {...@link #setDirectionEstimator}, + * and is available by default when at least one of the application's locales is + * right-to-left. + * + * * * Example * {...@example com.google.gwt.examples.TextBoxExample} === --- /trunk/user/src/com/google/gwt/user/client/ui/ValueBox.java Wed Aug 11 09:22:23 2010 +++ /trunk/user/src/com/google/gwt/user/client/ui/ValueBox.java Tue Aug 31 20:57:09 2010 @@ -18,7 +18,7 @@ import com.google.gwt.dom.client.Document; import com.google.gwt.dom.client.Element; import com.google.gwt.dom.client.InputElement; -import com.google.gwt.i18n.client.BidiUtils; +import com.google.gwt.i18n.client.LocaleInfo; import com.google.gwt.text.shared.Parser; import com.google.gwt.text.shared.Renderer; @@ -65,13 +65,13 @@ */ protected ValueBox(Element element, Renderer renderer, Parser parser) { super(element, renderer, parser); +// BiDi input is not expected - disable direction estimation. +setDirectionEstimator(false); +if (LocaleInfo.getCurrentLocale().isRTL()) { + setDirection(Direction.LTR); +} assert InputElement.as(element).getType().equalsIgnoreCase("text"); } - - @Override - public Direction getDirection() { -return BidiUtils.getDirectionOnElement(getElement()); - } /** * Gets the maximum allowable length. @@ -90,11 +90,6 @@ public int getVisibleLength() { return getInputElement().getSize(); } - - @Override - public void setDirection(Direction direction) { -BidiUtils.setDirectionOnElement(getElement(), direction); - } /** * Sets the maximum allowable length. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors