[gwt-contrib] Re: Public: Add default validators for the standard constraints. (issue735801)

2010-08-05 Thread nchalko



http://gwt-code-reviews.appspot.com/735801/diff/20002/26058#newcode35


user/test/com/google/gwt/validation/client/constraints/GwtCompileTest.java:35:

ListClass? temp = new ArrayListClass?(12);
12 != 13. Any real reason to set the size here?


No, removed.
The real issue, is the test should be check for size == 29.

http://gwt-code-reviews.appspot.com/735801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Removed trim in ValueBoxBase, forcing parsers to handle trim()ing. (issue738801)

2010-08-05 Thread rjrjr

LGTM

Nice! Thanks for the test.

http://gwt-code-reviews.appspot.com/738801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r8467 committed - Fix for issue 1813: RootPanel.get(id) fails to set 'position:relative'...

2010-08-05 Thread codesite-noreply

Revision: 8467
Author: fre...@google.com
Date: Mon Aug  2 22:47:54 2010
Log: Fix for issue 1813: RootPanel.get(id) fails to set 'position:relative'  
and 'overflow:hidden'


Adds a development mode only GWT.log() warning message when an instance of  
AbsolutePanel
inserts a non-statically positioned child and the parent  
has 'position:static', which

tells developers what's wrong with their CSS and how to fix it.

In production mode the warning message is compiled out and the extra check  
becomes a no-op.


Review at http://gwt-code-reviews.appspot.com/636803

Fixes issues: 1813

Review by: jlaba...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=8467

Modified:
 /trunk/user/src/com/google/gwt/user/client/ui/AbsolutePanel.java

===
--- /trunk/user/src/com/google/gwt/user/client/ui/AbsolutePanel.java	Thu  
Jul 29 11:09:15 2010
+++ /trunk/user/src/com/google/gwt/user/client/ui/AbsolutePanel.java	Mon  
Aug  2 22:47:54 2010

@@ -15,6 +15,7 @@
  */
 package com.google.gwt.user.client.ui;

+import com.google.gwt.core.client.GWT;
 import com.google.gwt.user.client.DOM;
 import com.google.gwt.user.client.Element;

@@ -113,6 +114,7 @@
 int beforeIndex = getWidgetCount();
 setWidgetPositionImpl(w, left, top);
 insert(w, beforeIndex);
+verifyPositionNotStatic(w);
   }

   /**
@@ -166,6 +168,7 @@
 w.removeFromParent();
 setWidgetPositionImpl(w, left, top);
 insert(w, beforeIndex);
+verifyPositionNotStatic(w);
   }

   /**
@@ -195,6 +198,7 @@
   public void setWidgetPosition(Widget w, int left, int top) {
 checkWidgetParent(w);
 setWidgetPositionImpl(w, left, top);
+verifyPositionNotStatic(w);
   }

   protected void setWidgetPositionImpl(Widget w, int left, int top) {
@@ -214,4 +218,20 @@
   Widget must be a child of this panel.);
 }
   }
-}
+
+  private void verifyPositionNotStatic(Widget w) {
+if (!GWT.isProdMode()) {
+  if (w.getElement().getOffsetParent() != getElement()) {
+String className = getClass().getName();
+GWT.log(Warning:  + className +  descendants will be  
incorrectly 
++ positioned, i.e. not relative to their parent element,  
when 
++ 'position:static', which is the CSS default, is in effect.  
One 

++ possible fix is to call 
+ 
+ 'panel.getElement().getStyle().setPosition(Position.RELATIVE)'.,

+// Stack trace provides context for the developer
+new IllegalStateException(className
++  is missing CSS 'position:{relative,absolute,fixed}'));
+  }
+}
+  }
+}

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r8468 committed - Rollback r8440 changes again...

2010-08-05 Thread codesite-noreply

Revision: 8468
Author: con...@google.com
Date: Tue Aug  3 08:08:39 2010
Log: Rollback r8440 changes again

Review by: rchan...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=8468

Added:
 /trunk/dev/core/src/com/google/gwt/dev/cfg/PublicOracle.java
Modified:
 /trunk/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java
 /trunk/dev/core/src/com/google/gwt/dev/resource/ResourceOracle.java
 /trunk/dev/core/src/com/google/gwt/dev/resource/impl/AbstractResource.java
  
/trunk/dev/core/src/com/google/gwt/dev/resource/impl/DirectoryClassPathEntry.java

 /trunk/dev/core/src/com/google/gwt/dev/resource/impl/FileResource.java
  
/trunk/dev/core/src/com/google/gwt/dev/resource/impl/ResourceOracleImpl.java
  
/trunk/dev/core/src/com/google/gwt/dev/resource/impl/ZipFileClassPathEntry.java

 /trunk/dev/core/src/com/google/gwt/dev/resource/impl/ZipFileResource.java
  
/trunk/dev/core/test/com/google/gwt/dev/resource/impl/AbstractResourceOrientedTestBase.java

 /trunk/dev/core/test/com/google/gwt/dev/resource/impl/FileResourceTest.java
  
/trunk/dev/core/test/com/google/gwt/dev/resource/impl/MockAbstractResource.java
  
/trunk/dev/core/test/com/google/gwt/dev/resource/impl/ResourceOracleImplRealClasspathTest.java
  
/trunk/dev/core/test/com/google/gwt/dev/resource/impl/ResourceOracleImplTest.java


===
--- /dev/null
+++ /trunk/dev/core/src/com/google/gwt/dev/cfg/PublicOracle.java	Tue Aug  3  
08:08:39 2010

@@ -0,0 +1,42 @@
+/*
+ * 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.dev.cfg;
+
+import com.google.gwt.dev.resource.Resource;
+
+/**
+ * Abstracts the process of querying for public files.
+ *
+ * @deprecated with no replacement, just use {...@link ModuleDef} directly
+ */
+...@deprecated
+public interface PublicOracle {
+
+  /**
+   * Finds a file on the public path.
+   *
+   * @param partialPath a file path relative to the root of any public  
package
+   * @return the url of the file, or codenull/code if no such file  
exists

+   */
+  Resource findPublicFile(String partialPath);
+
+  /**
+   * Returns all available public files.
+   *
+   * @return an array containing the partial path to each available public  
file

+   */
+  String[] getAllPublicFiles();
+}
===
--- /trunk/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java	Sat Jul 31  
10:16:08 2010
+++ /trunk/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java	Tue Aug  3  
08:08:39 2010

@@ -28,7 +28,6 @@
 import com.google.gwt.dev.resource.impl.DefaultFilters;
 import com.google.gwt.dev.resource.impl.PathPrefix;
 import com.google.gwt.dev.resource.impl.PathPrefixSet;
-import com.google.gwt.dev.resource.impl.ResourceFilter;
 import com.google.gwt.dev.resource.impl.ResourceOracleImpl;
 import com.google.gwt.dev.util.Empty;
 import com.google.gwt.dev.util.Util;
@@ -52,13 +51,8 @@
  * Represents a module specification. In principle, this could be built  
without

  * XML for unit tests.
  */
-public class ModuleDef {
-
-  private static final ResourceFilter NON_JAVA_RESOURCES = new  
ResourceFilter() {

-public boolean allows(String path) {
-  return !path.endsWith(.java)  !path.endsWith(.class);
-}
-  };
+...@suppresswarnings(deprecation)
+public class ModuleDef implements PublicOracle {

   private static final ComparatorMap.EntryString, ? REV_NAME_CMP = new  
ComparatorMap.EntryString, ?() {
 public int compare(Map.EntryString, ? entry1, Map.EntryString, ?  
entry2) {

@@ -121,7 +115,6 @@
   private final MapString, String servletClassNamesByPath = new  
HashMapString, String();


   private PathPrefixSet sourcePrefixSet = new PathPrefixSet();
-
   private final Styles styles = new Styles();

   public ModuleDef(String name) {
@@ -334,8 +327,8 @@
   PathPrefixSet pathPrefixes = lazySourceOracle.getPathPrefixes();
   PathPrefixSet newPathPrefixes = new PathPrefixSet();
   for (PathPrefix pathPrefix : pathPrefixes.values()) {
-newPathPrefixes.add(new PathPrefix(pathPrefix.getPrefix(),
-NON_JAVA_RESOURCES, pathPrefix.shouldReroot()));
+newPathPrefixes.add(new PathPrefix(pathPrefix.getPrefix(), null,
+pathPrefix.shouldReroot()));
   }
   lazyResourcesOracle.setPathPrefixes(newPathPrefixes);
   lazyResourcesOracle.refresh(TreeLogger.NULL);
===
--- 

[gwt-contrib] Re: Faster edit-distance computation in JsFunctionClusterer (issue669801)

2010-08-05 Thread zundel

Looking forward to seeing this land!

http://gwt-code-reviews.appspot.com/669801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r8469 committed - Cleanup some test infrastructure...

2010-08-05 Thread codesite-noreply

Revision: 8469
Author: sco...@google.com
Date: Tue Aug  3 09:23:48 2010
Log: Cleanup some test infrastructure

Review by: kplatf...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=8469

Modified:
 /trunk/dev/core/test/com/google/gwt/dev/javac/TypeOracleTestingUtils.java
 /trunk/dev/core/test/com/google/gwt/dev/javac/asm/ResolveGenericsTest.java

===
---  
/trunk/dev/core/test/com/google/gwt/dev/javac/TypeOracleTestingUtils.java	 
Tue Nov 10 20:42:30 2009
+++  
/trunk/dev/core/test/com/google/gwt/dev/javac/TypeOracleTestingUtils.java	 
Tue Aug  3 09:23:48 2010

@@ -47,17 +47,6 @@
 return buildTypeOracle(logger, standardBuildersPlus(resources),
 generatedUnits);
   }
-
-  public static void buildStandardTypeOracleWith(TypeOracleMediator  
mediator,

-  TreeLogger logger, Resource... resources) {
-buildStandardTypeOracleWith(mediator, logger, new HashSetResource(
-Arrays.asList(resources)));
-  }
-
-  public static void buildStandardTypeOracleWith(TypeOracleMediator  
mediator,

-  TreeLogger logger, SetResource resources) {
-buildTypeOracle(mediator, logger, standardBuildersPlus(resources));
-  }

   public static TypeOracle buildTypeOracle(TreeLogger logger,
   SetResource resources) {
@@ -72,13 +61,6 @@
 state.addGeneratedCompilationUnits(logger, generatedUnits);
 return state.getTypeOracle();
   }
-
-  public static void buildTypeOracle(TypeOracleMediator mediator,
-  TreeLogger logger, SetResource resources) {
-CompilationState state = CompilationStateBuilder.buildFrom(logger,
-resources);
-mediator.addNewUnits(logger, state.getCompilationUnits());
-  }

   /**
* Compilation resources for basic classes like Object and String.
===
---  
/trunk/dev/core/test/com/google/gwt/dev/javac/asm/ResolveGenericsTest.java	 
Tue Jan 12 09:01:40 2010
+++  
/trunk/dev/core/test/com/google/gwt/dev/javac/asm/ResolveGenericsTest.java	 
Tue Aug  3 09:23:48 2010

@@ -29,7 +29,6 @@
 import com.google.gwt.dev.asm.signature.SignatureReader;
 import com.google.gwt.dev.javac.MethodArgNamesLookup;
 import com.google.gwt.dev.javac.Resolver;
-import com.google.gwt.dev.javac.TypeOracleMediator;
 import com.google.gwt.dev.javac.TypeOracleTestingUtils;
 import com.google.gwt.dev.javac.TypeParameterLookup;
 import com.google.gwt.dev.javac.asm.CollectClassData.ClassType;
@@ -39,12 +38,12 @@
 import java.lang.reflect.TypeVariable;
 import java.util.Collections;
 import java.util.HashMap;
+import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;

 /**
- * Tests for {...@link ResolveClassSignature} and
- * {...@link ResolveMethodSignature}.
+ * Tests for {...@link ResolveClassSignature} and {...@link  
ResolveMethodSignature}.

  */
 public class ResolveGenericsTest extends AsmTestCase {

@@ -116,22 +115,19 @@

   private static final TreeLogger failTreeLogger = new  
FailErrorTreeLogger();


-  private static final String OUTER_CLASS_SIG
-  = H:Lcom/google/gwt/dev/javac/asm/TestHandler;Ljava/lang/Object;;
+  private static final String OUTER_CLASS_SIG  
= H:Lcom/google/gwt/dev/javac/asm/TestHandler;Ljava/lang/Object;;

   private static final String OUTER_METHOD_SIG = (TH;)V;

-  private static final String OUTER1_CLASS_SIG
-  = V:Ljava/lang/Object;Lcom/google/gwt/dev/javac/asm/TestOuter0
-+ Lcom/google/gwt/dev/javac/asm/TestHandler1TV
-  private static final String OUTER1_METHOD_SIG
-  = (Lcom/google/gwt/dev/javac/asm/TestHandler1TV;;)V;
-
-  private static final String OUTER2_CLASS_SIG
-  = Lcom/google/gwt/dev/javac/asm/TestOuter1Ljava/lang/String;;;
-  private static final String OUTER2_METHOD_SIG
-   
= (Lcom/google/gwt/dev/javac/asm/TestHandler1Ljava/lang/String;;)V;

-
-  private ResolverMockTypeOracle oracle = new ResolverMockTypeOracle();
+  private static final String OUTER1_CLASS_SIG  
= V:Ljava/lang/Object;Lcom/google/gwt/dev/javac/asm/TestOuter0

+  + Lcom/google/gwt/dev/javac/asm/TestHandler1TV
+  private static final String OUTER1_METHOD_SIG  
= (Lcom/google/gwt/dev/javac/asm/TestHandler1TV;;)V;

+
+  private static final String OUTER2_CLASS_SIG  
= Lcom/google/gwt/dev/javac/asm/TestOuter1Ljava/lang/String;;;
+  private static final String OUTER2_METHOD_SIG  
= (Lcom/google/gwt/dev/javac/asm/TestHandler1Ljava/lang/String;;)V;

+
+  private final MapString, JRealClassType binaryMapper;
+
+  private final TypeOracle oracle;

   @SuppressWarnings(unused)
   private JRealClassType testHandler;
@@ -151,13 +147,13 @@

   private Resolver resolver = new Resolver() {
 public MapString, JRealClassType getBinaryMapper() {
-  return oracle.getBinaryMapper();
-}
-
+  return binaryMapper;
+}
+
 public TypeOracle getTypeOracle() {
   return oracle;
 }
-
+
 public boolean resolveAnnotations(TreeLogger logger,
 ListCollectAnnotationData annotations,
 MapClass? 

[gwt-contrib] [google-web-toolkit] r8470 committed - Add the ability to change the size of a widget in the...

2010-08-05 Thread codesite-noreply

Revision: 8470
Author: t...@google.com
Date: Tue Aug  3 10:58:04 2010
Log: Add the ability to change the size of a widget in the
DockLayoutPanel after it has already been added.

Review at http://gwt-code-reviews.appspot.com/719802

Review by: j...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=8470

Modified:
 /trunk/user/src/com/google/gwt/user/client/ui/DockLayoutPanel.java

===
--- /trunk/user/src/com/google/gwt/user/client/ui/DockLayoutPanel.java	Thu  
Apr 22 07:37:11 2010
+++ /trunk/user/src/com/google/gwt/user/client/ui/DockLayoutPanel.java	Tue  
Aug  3 10:58:04 2010

@@ -304,6 +304,26 @@

 return removed;
   }
+
+  /**
+   * Updates the size of the widget passed in as long as it is not the  
center

+   * widget and updates the layout of the dock.
+   *
+   * @param widget the widget that needs to update its size
+   * @param size the size to update the widget to
+   */
+  public void setWidgetSize(Widget widget, double size) {
+assertIsChild(widget);
+LayoutData data = (LayoutData) widget.getLayoutData();
+
+assert data.direction != Direction.CENTER :
+The size of the center widget can not be updated.;
+
+data.size = size;
+
+// Update the layout.
+animate(0);
+  }

   protected Widget getCenter() {
 return center;

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] - Adds more instrumentation of the Compiler with SpeedTracerLogger. (issue742801)

2010-08-05 Thread zundel

Reviewers: conroy, fabbott, scottb,

Description:
- Adds more instrumentation of the Compiler with SpeedTracerLogger.
- Initializes the PermutationWorker with a thread name for debugging
purposes.


Please review this at http://gwt-code-reviews.appspot.com/742801/show

Affected files:
  M dev/core/src/com/google/gwt/dev/Compiler.java
  M dev/core/src/com/google/gwt/dev/PermutationWorkerFactory.java
  M dev/core/src/com/google/gwt/dev/Precompile.java
  M dev/core/src/com/google/gwt/dev/jdt/WebModeCompilerFrontEnd.java
  M dev/core/src/com/google/gwt/dev/jjs/ArtificialRescueRecorder.java
  M dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java
  M dev/core/src/com/google/gwt/dev/jjs/impl/AssertionNormalizer.java
  M dev/core/src/com/google/gwt/dev/jjs/impl/AssertionRemover.java
  M dev/core/src/com/google/gwt/dev/jjs/impl/BuildTypeMap.java
  M dev/core/src/com/google/gwt/dev/jjs/impl/CodeSplitter.java
  M dev/core/src/com/google/gwt/dev/jjs/impl/DeadCodeElimination.java
  M dev/core/src/com/google/gwt/dev/jjs/impl/Finalizer.java
  M dev/core/src/com/google/gwt/dev/jjs/impl/FixAssignmentToUnbox.java
  M dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaAST.java
  M dev/core/src/com/google/gwt/dev/jjs/impl/JavaScriptObjectNormalizer.java
  M dev/core/src/com/google/gwt/dev/jjs/impl/MakeCallsStatic.java
  M dev/core/src/com/google/gwt/dev/jjs/impl/MethodCallTightener.java
  M dev/core/src/com/google/gwt/dev/jjs/impl/MethodInliner.java
  M dev/core/src/com/google/gwt/dev/jjs/impl/Pruner.java
  M dev/core/src/com/google/gwt/dev/jjs/impl/RecordRebinds.java
  M dev/core/src/com/google/gwt/dev/jjs/impl/ReplaceRebinds.java
  M dev/core/src/com/google/gwt/dev/jjs/impl/ReplaceRunAsyncs.java
  M  
dev/core/src/com/google/gwt/dev/jjs/impl/SameParameterValueOptimizer.java

  M dev/core/src/com/google/gwt/dev/jjs/impl/TypeTightener.java
  M dev/core/src/com/google/gwt/dev/jjs/impl/gflow/DataflowOptimizer.java
  M dev/core/src/com/google/gwt/dev/util/Util.java
  M  
dev/core/src/com/google/gwt/dev/util/log/speedtracer/CompilerEventType.java



--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Public: Add default validators for the standard constraints. (issue735801)

2010-08-05 Thread nchalko

http://gwt-code-reviews.appspot.com/735801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Public: Add default validators for the standard constraints. (issue735801)

2010-08-05 Thread Ray Ryan
LGTM

On Thu, Aug 5, 2010 at 11:02 AM, ncha...@google.com wrote:

 http://gwt-code-reviews.appspot.com/735801/show


-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

[gwt-contrib] Refactor SpeedTracerLogger to use Event objects for controlling start/stop (issue704803)

2010-08-05 Thread conroy

Reviewers: zundel,

Description:
Refactor SpeedTracerLogger to use Event objects for controlling
start/stop

Review by: zun...@google.com

Please review this at http://gwt-code-reviews.appspot.com/704803/show

Affected files:
  M dev/core/src/com/google/gwt/dev/Compiler.java
  M dev/core/src/com/google/gwt/dev/DevMode.java
  M dev/core/src/com/google/gwt/dev/DevModeBase.java
  M dev/core/src/com/google/gwt/dev/GWTCompiler.java
  M dev/core/src/com/google/gwt/dev/Precompile.java
  M dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java
  M dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java
  M dev/core/src/com/google/gwt/dev/javac/CompilationState.java
  M dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java
  M dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java
  M dev/core/src/com/google/gwt/dev/javac/StandardGeneratorContext.java
  M dev/core/src/com/google/gwt/dev/javac/TypeOracleMediator.java
  M dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java
  M dev/core/src/com/google/gwt/dev/jjs/impl/CodeSplitter.java
  M dev/core/src/com/google/gwt/dev/resource/impl/ResourceOracleImpl.java
  M dev/core/src/com/google/gwt/dev/shell/ModuleSpace.java
  M dev/core/src/com/google/gwt/dev/shell/ModuleSpaceOOPHM.java
  M dev/core/src/com/google/gwt/dev/shell/OophmSessionHandler.java
  M dev/core/src/com/google/gwt/dev/shell/ShellModuleSpaceHost.java
  M dev/core/src/com/google/gwt/dev/shell/StandardRebindOracle.java
  M  
dev/core/src/com/google/gwt/dev/shell/rewrite/HostedModeClassRewriter.java
  M  
dev/core/src/com/google/gwt/dev/util/log/speedtracer/SpeedTracerLogger.java
  M  
dev/core/test/com/google/gwt/dev/util/log/speedtracer/SpeedTracerLoggerTest.java



--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Refactor SpeedTracerLogger to use Event objects for controlling start/stop (issue704803)

2010-08-05 Thread zundel


http://gwt-code-reviews.appspot.com/704803/diff/1/2
File dev/core/src/com/google/gwt/dev/Compiler.java (right):

http://gwt-code-reviews.appspot.com/704803/diff/1/2#newcode207
dev/core/src/com/google/gwt/dev/Compiler.java:207: Event
precompileEventEvent =
SpeedTracerLogger.start(CompilerEventType.PRECOMPILE);
Did you mean this to be named with the double suffix EventEvent?

http://gwt-code-reviews.appspot.com/704803/diff/1/2#newcode211
dev/core/src/com/google/gwt/dev/Compiler.java:211:
SpeedTracerLogger.end(precompileEventEvent);
what do you think about changing this to

precompileEvent.end()

http://gwt-code-reviews.appspot.com/704803/diff/1/23
File
dev/core/src/com/google/gwt/dev/util/log/speedtracer/SpeedTracerLogger.java
(right):

http://gwt-code-reviews.appspot.com/704803/diff/1/23#newcode196
dev/core/src/com/google/gwt/dev/util/log/speedtracer/SpeedTracerLogger.java:196:
public static void end(Event event, String... data) {
I'm not sure we need a static method anymore, because the event argument
is sufficient.

http://gwt-code-reviews.appspot.com/704803/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: - Adds more instrumentation of the Compiler with SpeedTracerLogger. (issue742801)

2010-08-05 Thread conroy

On 2010/08/05 17:45:00, zundel wrote:


LGTM


http://gwt-code-reviews.appspot.com/742801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Refactor SpeedTracerLogger to use Event objects for controlling start/stop (issue704803)

2010-08-05 Thread conroy

will update this patch to rebase against your pending changes


http://gwt-code-reviews.appspot.com/704803/diff/1/2
File dev/core/src/com/google/gwt/dev/Compiler.java (right):

http://gwt-code-reviews.appspot.com/704803/diff/1/2#newcode207
dev/core/src/com/google/gwt/dev/Compiler.java:207: Event
precompileEventEvent =
SpeedTracerLogger.start(CompilerEventType.PRECOMPILE);
On 2010/08/05 18:33:08, zundel wrote:

Did you mean this to be named with the double suffix EventEvent?


whoops, nope.

http://gwt-code-reviews.appspot.com/704803/diff/1/2#newcode211
dev/core/src/com/google/gwt/dev/Compiler.java:211:
SpeedTracerLogger.end(precompileEventEvent);
On 2010/08/05 18:33:08, zundel wrote:

what do you think about changing this to



precompileEvent.end()


I thought about this but decided not to simply because Event.end() would
end up redirecting as the same function call since it needs to have the
threadPendingEvents, etc.. Since they are functionally equivalent I
didn't see a big win by doing that refactor.

http://gwt-code-reviews.appspot.com/704803/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Refactor SpeedTracerLogger to use Event objects for controlling start/stop (issue704803)

2010-08-05 Thread zundel


http://gwt-code-reviews.appspot.com/704803/diff/1/2
File dev/core/src/com/google/gwt/dev/Compiler.java (right):

http://gwt-code-reviews.appspot.com/704803/diff/1/2#newcode211
dev/core/src/com/google/gwt/dev/Compiler.java:211:
SpeedTracerLogger.end(precompileEventEvent);
On 2010/08/05 18:44:43, conroy wrote:

On 2010/08/05 18:33:08, zundel wrote:
 what do you think about changing this to

 precompileEvent.end()



I thought about this but decided not to simply because Event.end()

would end up

redirecting as the same function call since it needs to have the
threadPendingEvents, etc.. Since they are functionally equivalent I

didn't see a

big win by doing that refactor.


The win I see is that it is easier to type.  The SpeedTracerLogger part
is redundant because the event instance is already part of the class.

http://gwt-code-reviews.appspot.com/704803/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Faster edit-distance computation in JsFunctionClusterer (issue669801)

2010-08-05 Thread avassalotti

I updated the patch.

Lex, can I submit it?

http://gwt-code-reviews.appspot.com/669801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Faster edit-distance computation in JsFunctionClusterer (issue669801)

2010-08-05 Thread Lex Spoon
Ray, does the patch look good to you?   -Lex

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

[gwt-contrib] Re: Faster edit-distance computation in JsFunctionClusterer (issue669801)

2010-08-05 Thread zundel


http://gwt-code-reviews.appspot.com/669801/diff/33001/34006
File dev/core/src/com/google/gwt/dev/jjs/impl/JsFunctionClusterer.java
(right):

http://gwt-code-reviews.appspot.com/669801/diff/33001/34006#newcode43
dev/core/src/com/google/gwt/dev/jjs/impl/JsFunctionClusterer.java:43:
Pattern.compile(function |[_a-zA-Z$][.$_a-zA-Z0-9]*=function);
Wait a minute, what happened to the caret?  This means any line with the
string function  in it will match.  Is that what we want?

http://gwt-code-reviews.appspot.com/669801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: De-bounce built-in selection models (issue722802)

2010-08-05 Thread דניאל רייס
  Yes, I'll upload it in a sec.

Dan

On Thu, Aug 5, 2010 at 1:12 PM, Ray Ryan rj...@google.com wrote:

 Ready for re-review?


 On Wed, Aug 4, 2010 at 1:39 PM, r...@google.com wrote:

 http://gwt-code-reviews.appspot.com/722802/show




-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

[gwt-contrib] Re: Refactor SpeedTracerLogger to use Event objects for controlling start/stop (issue704803)

2010-08-05 Thread conroy


http://gwt-code-reviews.appspot.com/704803/diff/1/2
File dev/core/src/com/google/gwt/dev/Compiler.java (right):

http://gwt-code-reviews.appspot.com/704803/diff/1/2#newcode211
dev/core/src/com/google/gwt/dev/Compiler.java:211:
SpeedTracerLogger.end(precompileEventEvent);
On 2010/08/05 18:53:45, scottb wrote:

It's shorter.  If you *don't* do what Eric's suggesting, why are you

doing this

change at all?


The motivation for this is for two main reasons
1) Make addData sane. Currently you could accidentally add data in the
middle of an event to a child event since you don't know what's on the
stack and what isn't.
2) Unrolling missed events is problematic when just checking types. With
this change, we can actually compare the event objects and unroll a lot
cleaner.

However, since it is more concise, I'll go ahead and make that change
too.

http://gwt-code-reviews.appspot.com/704803/diff/1/23
File
dev/core/src/com/google/gwt/dev/util/log/speedtracer/SpeedTracerLogger.java
(right):

http://gwt-code-reviews.appspot.com/704803/diff/1/23#newcode59
dev/core/src/com/google/gwt/dev/util/log/speedtracer/SpeedTracerLogger.java:59:
public class Event {
On 2010/08/05 18:53:45, scottb wrote:

Maybe split out public interface / private implementation like with

EventType?

With only one implementation of Event, I don't see a need for an
interface here.

http://gwt-code-reviews.appspot.com/704803/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Moved the create method from DeltaValueStore, used Long futureIds. Deleted ValueStore interface ... (issue721805)

2010-08-05 Thread amitmanjhi

Reviewers: Ray Ryan,

Description:
Moved the create method from DeltaValueStore, used Long futureIds.
Deleted ValueStore interface and made ValueStoreJsonImpl non-public.

Patch by: amitmanjhi
Review by: rjrjr (desk review)


Please review this at http://gwt-code-reviews.appspot.com/721805/show

Affected files:
  M  
bikeshed/src/com/google/gwt/sample/expenses/gwt/client/MobileExpenseEntry.java
  M  
bikeshed/src/com/google/gwt/sample/expenses/gwt/client/MobileReportEntry.java
  M  
bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/employee/EmployeeEditActivity.java
  M  
bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/report/ReportEditActivity.java

  M user/src/com/google/gwt/app/place/AbstractRecordEditActivity.java
  M user/src/com/google/gwt/requestfactory/client/impl/AbstractRequest.java
  M  
user/src/com/google/gwt/requestfactory/client/impl/DeltaValueStoreJsonImpl.java

  M user/src/com/google/gwt/requestfactory/client/impl/RecordKey.java
  M  
user/src/com/google/gwt/requestfactory/client/impl/RequestFactoryJsonImpl.java
  M  
user/src/com/google/gwt/requestfactory/client/impl/ValueStoreJsonImpl.java
  M  
user/src/com/google/gwt/requestfactory/rebind/RequestFactoryGenerator.java

  M user/src/com/google/gwt/requestfactory/shared/DeltaValueStore.java
  M user/src/com/google/gwt/requestfactory/shared/RequestFactory.java
  M user/src/com/google/gwt/valuestore/client/SyncResultImpl.java
  M user/src/com/google/gwt/valuestore/shared/SyncResult.java
  D user/src/com/google/gwt/valuestore/shared/ValueStore.java
  M  
user/test/com/google/gwt/requestfactory/client/impl/DeltaValueStoreJsonImplTest.java



--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Moved the create method from DeltaValueStore, used Long futureIds. Deleted ValueStore interface ... (issue721805)

2010-08-05 Thread rjrjr

LGTM provided DynaTableRF sample is not broken

http://gwt-code-reviews.appspot.com/721805/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Moved the create method from DeltaValueStore, used Long futureIds. Deleted ValueStore interface ... (issue721805)

2010-08-05 Thread Amit Manjhi
checked. It does not do any creates and so is fine.

On Thu, Aug 5, 2010 at 12:31 PM, rj...@google.com wrote:

 LGTM provided DynaTableRF sample is not broken


 http://gwt-code-reviews.appspot.com/721805/show


-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

[gwt-contrib] Re: De-bounce built-in selection models (issue722802)

2010-08-05 Thread rice

http://gwt-code-reviews.appspot.com/722802/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Moved the create method from DeltaValueStore, used Long futureIds. Deleted ValueStore interface ... (issue721805)

2010-08-05 Thread Ray Ryan
LGTM++

Thanks for looking

On Thu, Aug 5, 2010 at 12:34 PM, Amit Manjhi amitman...@google.com wrote:

 checked. It does not do any creates and so is fine.


 On Thu, Aug 5, 2010 at 12:31 PM, rj...@google.com wrote:

 LGTM provided DynaTableRF sample is not broken


 http://gwt-code-reviews.appspot.com/721805/show




-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

[gwt-contrib] Re: De-bounce built-in selection models (issue722802)

2010-08-05 Thread rjrjr

LGTM

One nit, one refactor request


http://gwt-code-reviews.appspot.com/722802/diff/15001/16001
File user/src/com/google/gwt/view/client/DefaultSelectionModel.java
(right):

http://gwt-code-reviews.appspot.com/722802/diff/15001/16001#newcode62
user/src/com/google/gwt/view/client/DefaultSelectionModel.java:62:
resolveChanges();
Nice. I like how you wait until someone asks.

http://gwt-code-reviews.appspot.com/722802/diff/15001/16003
File user/src/com/google/gwt/view/client/SelectionModel.java (right):

http://gwt-code-reviews.appspot.com/722802/diff/15001/16003#newcode89
user/src/com/google/gwt/view/client/SelectionModel.java:89: if
(getIsEventScheduled()) {
nit: usually a boolean getter is simply named isFoo(), not getIsFoo().
Paired with setFoo, not setIsFoo

http://gwt-code-reviews.appspot.com/722802/diff/15001/16003#newcode137
user/src/com/google/gwt/view/client/SelectionModel.java:137:
GwtEventSelectionChangeHandler {
This should really be in its own file, with its handler interface nested
in it:

public class SelectionChangeEvent extends
GwtEventSelectionChangeEvent.Handler {
  interface Handler {
  }
}

Like that.

If that's out of scope for this CL, can you circle back and do it soon?

http://gwt-code-reviews.appspot.com/722802/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Comment on RpcAuth in google-web-toolkit

2010-08-05 Thread codesite-noreply

Comment by amanigot:

do you have any news on this framework ?


For more information:
http://code.google.com/p/google-web-toolkit/wiki/RpcAuth

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Refactor SpeedTracerLogger to use Event objects for controlling start/stop (issue704803)

2010-08-05 Thread conroy

http://gwt-code-reviews.appspot.com/704803/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Fix RPC charset parameter tests (issue723803)

2010-08-05 Thread fredsa

Reviewers: amitmanjhi,

Description:
Fix RPC charset parameter tests


Please review this at http://gwt-code-reviews.appspot.com/723803/show

Affected files:
  M user/test/com/google/gwt/user/server/rpc/RPCServletUtilsTest.java


Index: user/test/com/google/gwt/user/server/rpc/RPCServletUtilsTest.java
===
--- user/test/com/google/gwt/user/server/rpc/RPCServletUtilsTest.java	 
(revision 8471)
+++ user/test/com/google/gwt/user/server/rpc/RPCServletUtilsTest.java	 
(working copy)

@@ -53,7 +53,7 @@

 @Override
 public String getCharacterEncoding() {
-  return charset=utf-8;
+  return utf-8;
 }

 @Override
@@ -174,7 +174,7 @@

   @Override
   public String getCharacterEncoding() {
-return charset=EBCDIC-US;
+return EBCDIC-US;
   }
 };

@@ -197,7 +197,7 @@

   @Override
   public String getCharacterEncoding() {
-return charset=EBCDIC-US;
+return EBCDIC-US;
   }
 };
 boolean gotException = false;


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Fix RPC charset parameter tests (issue723803)

2010-08-05 Thread amitmanjhi

LGTM

http://gwt-code-reviews.appspot.com/723803/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Refactor SpeedTracerLogger to use Event objects for controlling start/stop (issue704803)

2010-08-05 Thread zundel

LGTM with nits.


http://gwt-code-reviews.appspot.com/704803/diff/9001/10003
File dev/core/src/com/google/gwt/dev/DevModeBase.java (right):

http://gwt-code-reviews.appspot.com/704803/diff/9001/10003#newcode1085
dev/core/src/com/google/gwt/dev/DevModeBase.java:1085:
startupEvent.end();
you could consolidate the end() to one call as follows:

result = doSlowStartup();
if (!result) {
   log(...);
}
startupEvent.end();
return result;

http://gwt-code-reviews.appspot.com/704803/diff/9001/10010
File dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java
(right):

http://gwt-code-reviews.appspot.com/704803/diff/9001/10010#newcode210
dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java:210:
Event compilationSTateBuilderProcess =
wEiRd caps

http://gwt-code-reviews.appspot.com/704803/diff/9001/10016
File dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java
(right):

http://gwt-code-reviews.appspot.com/704803/diff/9001/10016#newcode1024
dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java:1024:
Event soyc =
SpeedTracerLogger.start(CompilerEventType.MAKE_SOYC_ARTIFACTS);
You left off the 'Event' suffix from these vars which makes the .end()
calls a little lese readable.

http://gwt-code-reviews.appspot.com/704803/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Refactor SpeedTracerLogger to use Event objects for controlling start/stop (issue704803)

2010-08-05 Thread conroy

http://gwt-code-reviews.appspot.com/704803/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Public: Add default validators for the standard constraints. (issue735801)

2010-08-05 Thread nchalko

http://gwt-code-reviews.appspot.com/735801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Faster edit-distance computation in JsFunctionClusterer (issue669801)

2010-08-05 Thread avassalotti


http://gwt-code-reviews.appspot.com/669801/diff/33001/34006
File dev/core/src/com/google/gwt/dev/jjs/impl/JsFunctionClusterer.java
(right):

http://gwt-code-reviews.appspot.com/669801/diff/33001/34006#newcode43
dev/core/src/com/google/gwt/dev/jjs/impl/JsFunctionClusterer.java:43:
Pattern.compile(function |[_a-zA-Z$][.$_a-zA-Z0-9]*=function);
On 2010/08/05 19:27:01, zundel wrote:

Wait a minute, what happened to the caret?  This means any line with

the string

function  in it will match.  Is that what we want?


This is not an issue since the lookingAt() method, which matches only at
the beginning of a string, is used in isFunctionDeclaration().

http://gwt-code-reviews.appspot.com/669801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Refactor SpeedTracerLogger to use Event objects for controlling start/stop (issue704803)

2010-08-05 Thread conroy

http://gwt-code-reviews.appspot.com/704803/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Refactor SpeedTracerLogger to use Event objects for controlling start/stop (issue704803)

2010-08-05 Thread conroy

On 2010/08/05 23:44:23, conroy wrote:


@zundel please review the latest patch set. I had to add a DummyEvent to
handle the case where profiling is not active. Otherwise the
myEvent.end() call would result in a nullPointerException.


http://gwt-code-reviews.appspot.com/704803/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Faster edit-distance computation in JsFunctionClusterer (issue669801)

2010-08-05 Thread zundel

On 2010/08/05 23:02:48, Alexandre Vassalotti wrote:

http://gwt-code-reviews.appspot.com/669801/diff/33001/34006
File dev/core/src/com/google/gwt/dev/jjs/impl/JsFunctionClusterer.java

(right):


http://gwt-code-reviews.appspot.com/669801/diff/33001/34006#newcode43
dev/core/src/com/google/gwt/dev/jjs/impl/JsFunctionClusterer.java:43:
Pattern.compile(function |[_a-zA-Z$][.$_a-zA-Z0-9]*=function);
On 2010/08/05 19:27:01, zundel wrote:
 Wait a minute, what happened to the caret?  This means any line with

the

string
 function  in it will match.  Is that what we want?



This is not an issue since the lookingAt() method, which matches only

at the

beginning of a string, is used in isFunctionDeclaration().


OK

http://gwt-code-reviews.appspot.com/669801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Refactor SpeedTracerLogger to use Event objects for controlling start/stop (issue704803)

2010-08-05 Thread zundel

still LGTM

http://gwt-code-reviews.appspot.com/704803/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Pectin 0.8 Released

2010-08-05 Thread Andrew Pietsch
Hi all,

Pectin 0.8 has finally been released and contains quite a number of
additions and improvements. Most notably the new release includes:

* Binders now works on any Value/ListModel and not just with
FormModels.
E.g. binder.bind(MutalbeValueModelT).to(HasValueT)  // or
to(ValueTargetT) or ParameterisedCommandT etc.
* Binder also support binding to HasText  HasHTML
  * binder.bind(ValueModelT).toTextOf(HasText)
  *
binder.bind(ValueModelT).toHtmlOf(HasHTML).withFormat(FormatT);
* And support show/hide/enable/disable directly
  * binder.show(UiObject).when(ValueModelBoolean)
  * binder.hide(Element).when(ValueModelBoolean)

* Bean binding now supports nested property paths.  I.e. You can now
go:
  fieldOfType(String.class).boundTo(provider, address.postCode);
  or
  ValueModelString postCode =
provider.getValueModel(address.postCode, String.class);

* UiCommands have been improved and include new exception handlers.
* New support for computed models outside of forms e.g. ValueModelT
v =  Functions.computedFrom(ListModelS).using(ReduceT,S)
* Interceptors now have thier own package
* New InterceptedValueModels that use the above.

There's quite a lot more to the above changes and you can read the
details at:
http://code.google.com/p/gwt-pectin/wiki/ReleaseNotes

There's also more details of the future direction in:
http://code.google.com/p/gwt-pectin/wiki/FutureFeaturesAndDesignIdeas

Cheers
Andrew

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Another step towards making instance methods real. The interface on the client is pretty much wh... (issue710803)

2010-08-05 Thread amitmanjhi

Reviewers: Ray Ryan,

Description:
Another step towards making instance methods real. The interface on the
client is pretty much what it needs to be.

EmployeeRequest has a method like
RequestObjectVoid remove(EmployeeRecord record);

However, there is a hack in place to get it to work on the server. (The
hack was already there, this patch just moves it around.)

Patch by: amitmanjhi
Review by: rjrjr (desk review)


Please review this at http://gwt-code-reviews.appspot.com/710803/show

Affected files:
  M  
bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpenseDetails.java
  M  
bikeshed/src/com/google/gwt/sample/expenses/gwt/client/MobileReportEntry.java
  M  
bikeshed/src/com/google/gwt/sample/expenses/gwt/request/EmployeeRequest.java
  M  
bikeshed/src/com/google/gwt/sample/expenses/gwt/request/ReportRequest.java
  M  
bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/employee/EmployeeDetailsActivity.java
  M  
bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/employee/EmployeeEditActivity.java
  M  
bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/report/ReportDetailsActivity.java
  M  
bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/report/ReportEditActivity.java

  M user/src/com/google/gwt/app/place/AbstractRecordEditActivity.java
  M  
user/src/com/google/gwt/requestfactory/client/impl/RequestFactoryJsonImpl.java
  M  
user/src/com/google/gwt/requestfactory/rebind/RequestFactoryGenerator.java

  M user/src/com/google/gwt/requestfactory/server/JsonRequestProcessor.java
  M user/src/com/google/gwt/requestfactory/server/RequestFactoryServlet.java
  M user/src/com/google/gwt/requestfactory/server/SampleDataPopulator.java
  A user/src/com/google/gwt/requestfactory/shared/RequestData.java
  M user/src/com/google/gwt/requestfactory/shared/RequestObject.java
  D  
user/src/com/google/gwt/requestfactory/shared/impl/JsonRequestDataUtil.java
  M  
user/src/com/google/gwt/requestfactory/shared/impl/RequestDataManager.java
  M  
user/test/com/google/gwt/requestfactory/server/JsonRequestProcessorTest.java



--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Another step towards making instance methods real. The interface on the client is pretty much wh... (issue710803)

2010-08-05 Thread Ray Ryan
LGTM

On Thu, Aug 5, 2010 at 5:32 PM, amitman...@google.com wrote:

 Reviewers: Ray Ryan,

 Description:
 Another step towards making instance methods real. The interface on the
 client is pretty much what it needs to be.

 EmployeeRequest has a method like
 RequestObjectVoid remove(EmployeeRecord record);

 However, there is a hack in place to get it to work on the server. (The
 hack was already there, this patch just moves it around.)

 Patch by: amitmanjhi
 Review by: rjrjr (desk review)


 Please review this at http://gwt-code-reviews.appspot.com/710803/show

 Affected files:
  M
 bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpenseDetails.java
  M
 bikeshed/src/com/google/gwt/sample/expenses/gwt/client/MobileReportEntry.java
  M
 bikeshed/src/com/google/gwt/sample/expenses/gwt/request/EmployeeRequest.java
  M
 bikeshed/src/com/google/gwt/sample/expenses/gwt/request/ReportRequest.java
  M
 bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/employee/EmployeeDetailsActivity.java
  M
 bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/employee/EmployeeEditActivity.java
  M
 bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/report/ReportDetailsActivity.java
  M
 bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/report/ReportEditActivity.java
  M user/src/com/google/gwt/app/place/AbstractRecordEditActivity.java
  M
 user/src/com/google/gwt/requestfactory/client/impl/RequestFactoryJsonImpl.java
  M
 user/src/com/google/gwt/requestfactory/rebind/RequestFactoryGenerator.java
  M user/src/com/google/gwt/requestfactory/server/JsonRequestProcessor.java
  M user/src/com/google/gwt/requestfactory/server/RequestFactoryServlet.java
  M user/src/com/google/gwt/requestfactory/server/SampleDataPopulator.java
  A user/src/com/google/gwt/requestfactory/shared/RequestData.java
  M user/src/com/google/gwt/requestfactory/shared/RequestObject.java
  D
 user/src/com/google/gwt/requestfactory/shared/impl/JsonRequestDataUtil.java
  M
 user/src/com/google/gwt/requestfactory/shared/impl/RequestDataManager.java
  M
 user/test/com/google/gwt/requestfactory/server/JsonRequestProcessorTest.java




-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

[gwt-contrib] [google-web-toolkit] r8471 committed - Split LogManager class into an set of Impl classes so that any LogMana...

2010-08-05 Thread codesite-noreply

Revision: 8471
Author: gwt.mirror...@gmail.com
Date: Thu Aug  5 19:03:31 2010
Log: Split LogManager class into an set of Impl classes so that any  
LogManager calls

in code will compile out cleanly when logging is disabled

Review at http://gwt-code-reviews.appspot.com/638802

Review by: fre...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=8471

Added:
 /trunk/user/src/com/google/gwt/logging/impl/LogManagerImpl.java
 /trunk/user/src/com/google/gwt/logging/impl/LogManagerImplNull.java
 /trunk/user/src/com/google/gwt/logging/impl/LogManagerImplRegular.java
Modified:
 /trunk/user/src/com/google/gwt/logging/LogImpl.gwt.xml
 /trunk/user/super/com/google/gwt/emul/java/util/logging/LogManager.java

===
--- /dev/null
+++ /trunk/user/src/com/google/gwt/logging/impl/LogManagerImpl.java	Thu  
Aug  5 19:03:31 2010

@@ -0,0 +1,31 @@
+/*
+ * 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.logging.impl;
+
+import java.util.logging.LogManager;
+import java.util.logging.Logger;
+
+/**
+ * Interface for the implementation of LogManager. We use a  
LogManagerImplNull

+ * to ensure that logging code compiles out when logging is disabled, and a
+ * LogManagerImplRegular to provide normal functionality when logging is  
enabled

+ */
+public interface LogManagerImpl {
+  boolean addLogger(Logger logger);
+  Logger getLogger(String name);
+  LogManager getLogManager();
+}
===
--- /dev/null
+++ /trunk/user/src/com/google/gwt/logging/impl/LogManagerImplNull.java	Thu  
Aug  5 19:03:31 2010

@@ -0,0 +1,38 @@
+/*
+ * 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.logging.impl;
+
+import java.util.logging.LogManager;
+import java.util.logging.Logger;
+
+/**
+ * Implementation for the LogManager class when logging is disabled.
+ */
+public class LogManagerImplNull {
+
+  boolean addLogger(Logger logger) {
+return false;
+  }
+
+  Logger getLogger(String name) {
+return null;
+  }
+
+  LogManager getLogManager() {
+return null;
+  }
+}
===
--- /dev/null
+++ /trunk/user/src/com/google/gwt/logging/impl/LogManagerImplRegular.java	 
Thu Aug  5 19:03:31 2010

@@ -0,0 +1,111 @@
+/*
+ * 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.logging.impl;
+
+import java.util.HashMap;
+import java.util.logging.Level;
+import java.util.logging.LogManager;
+import java.util.logging.Logger;
+
+/**
+ * Implementation for the LogManager class when logging is enabled.
+ */
+public class LogManagerImplRegular {
+
+  /**
+   * Since the Impl class is in a different package than the LogManager  
class,

+   * we need to work around the fact that the Impl class cannot access the
+   * protected constructor.
+   */
+  private static class LogManagerWithExposedConstructor extends LogManager  
{

+public LogManagerWithExposedConstructor() {
+  super();
+}
+  }
+
+  /**
+   * Since the Logger constructor is protected, the LogManager cannot  
create
+   * one directly, so we create a RootLogger which has an exposed  
constructor.

+   */
+  private class RootLogger extends Logger {
+public RootLogger() {
+  super(, null);
+  setLevel(Level.ALL);
+}
+  }
+
+  private static 

Re: [gwt-contrib] Re: Enhancement for issue 4870 (issue732801)

2010-08-05 Thread John Tamplin
On Mon, Aug 2, 2010 at 2:39 PM, Eric B. Ridge eeb...@gmail.com wrote:

 What I think is a better solution is for the server-side to *not*
 reset the response status, and for the client-side to examine the
 encodedResponse when the status is not SC_OK.  If the encodedResponse
 is an exception, it should decode it and throw it (rather than
 throwing a StatusCodeException).


How do you know you are getting a serialized exception rather than some
random error page returned by the server?

-- 
John A. Tamplin
Software Engineer (GWT), Google

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

[gwt-contrib] [google-web-toolkit] r8472 committed - Put in a new fix for DevMode logging that uses bytecode rewriting rath...

2010-08-05 Thread codesite-noreply

Revision: 8472
Author: gwt.mirror...@gmail.com
Date: Tue Aug  3 17:01:46 2010
Log: Put in a new fix for DevMode logging that uses bytecode rewriting  
rather than swapping out

the LogManager and should work with App Engine apps

Review at http://gwt-code-reviews.appspot.com/725801

Review by: sco...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=8472

Added:
  
/trunk/dev/core/src/com/google/gwt/dev/shell/rewrite/UseMirroredClasses.java

 /trunk/user/src/com/google/gwt/logging/impl/DevModeLoggingFixes.java
Deleted:
 /trunk/dev/core/src/com/google/gwt/dev/shell/DevModeLogManager.java
 /trunk/dev/core/test/com/google/gwt/dev/DevModeBaseTest.java
 /trunk/dev/core/test/com/google/gwt/dev/shell/DevModeLogManagerTest.java
Modified:
 /trunk/dev/core/src/com/google/gwt/dev/DevModeBase.java
 /trunk/dev/core/src/com/google/gwt/dev/shell/BrowserChannelServer.java
 /trunk/dev/core/src/com/google/gwt/dev/shell/GWTBridgeImpl.java
  
/trunk/dev/core/src/com/google/gwt/dev/shell/rewrite/HostedModeClassRewriter.java

 /trunk/dev/core/super/com/google/gwt/core/client/GWTBridge.java
 /trunk/user/src/com/google/gwt/core/client/GWT.java
 /trunk/user/src/com/google/gwt/junit/GWTDummyBridge.java
 /trunk/user/src/com/google/gwt/logging/client/LogConfiguration.java

===
--- /dev/null
+++  
/trunk/dev/core/src/com/google/gwt/dev/shell/rewrite/UseMirroredClasses.java	 
Tue Aug  3 17:01:46 2010

@@ -0,0 +1,160 @@
+/*
+ * 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.dev.shell.rewrite;
+
+import com.google.gwt.dev.asm.ClassAdapter;
+import com.google.gwt.dev.asm.ClassVisitor;
+import com.google.gwt.dev.asm.MethodAdapter;
+import com.google.gwt.dev.asm.MethodVisitor;
+import com.google.gwt.dev.asm.Opcodes;
+import com.google.gwt.dev.asm.Type;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * A general Class Visitor which will take any of the method calls in it's
+ * list and replace them with static calls to another method  
(the mirrored

+ * method) in another class (the mirrored class). This method should
+ * take the original object as it's first argument, followed by the rest of
+ * the arguments to the method.  The mirrored class will not be  
rewritten,
+ * allowing the mirrored method to do whatever modifications are  
necessary
+ * before calling the original method (if desired).  Methods which should  
be

+ * rewritten are listed in the mirroredMethods map below. Note that our
+ * mirroring process is not robust enough to rewrite methods on subtypes.
+ */
+public class UseMirroredClasses extends ClassAdapter {
+  private static class MethodInterceptor extends MethodAdapter {
+private static HashMapString, HashMapString, String mirrorMap;
+static {
+// The list of mirrored methods
+// TODO(unnurg): Find a better way to track methods that will get
+// rewritten - possibly by using annotations
+mirrorMap = new HashMapString, HashMapString, String();
+
+HashMapString, String logRecordMethods = new HashMapString,  
String();

+logRecordMethods.put(
+getLoggerName,
+com/google/gwt/logging/impl/DevModeLoggingFixes:getLoggerName);
+mirrorMap.put(java/util/logging/LogRecord, logRecordMethods);
+
+HashMapString, String logManagerMethods = new HashMapString,  
String();

+logManagerMethods.put(
+getLogger,
+
com/google/gwt/logging/impl/DevModeLoggingFixes:logManagerGetLogger);
+mirrorMap.put(java/util/logging/LogManager, logManagerMethods);
+
+HashMapString, String loggerMethods = new HashMapString,  
String();

+loggerMethods.put(
+getName,
+com/google/gwt/logging/impl/DevModeLoggingFixes:getName);
+loggerMethods.put(
+getLogger,
+com/google/gwt/logging/impl/DevModeLoggingFixes:loggerGetLogger);
+mirrorMap.put(java/util/logging/Logger, loggerMethods);
+  }
+
+private String className;
+
+protected MethodInterceptor(MethodVisitor mv, String className) {
+  super(mv);
+  this.className = className;
+}
+
+@Override
+public void visitMethodInsn(int opcode, String owner, String name,
+String desc) {
+
+  // Check if this method is in our list
+  MapString, String mirroredMethods = mirrorMap.get(owner);
+  if (mirroredMethods == 

[gwt-contrib] [google-web-toolkit] r8473 committed - Rollback of:...

2010-08-05 Thread codesite-noreply

Revision: 8473
Author: unn...@google.com
Date: Tue Aug  3 17:17:07 2010
Log: Rollback of:
Split LogManager class into an set of Impl classes so that any LogManager  
calls

in code will compile out cleanly when logging is disabled

Review by: fre...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=8473

Deleted:
 /trunk/user/src/com/google/gwt/logging/impl/LogManagerImpl.java
 /trunk/user/src/com/google/gwt/logging/impl/LogManagerImplNull.java
 /trunk/user/src/com/google/gwt/logging/impl/LogManagerImplRegular.java
Modified:
 /trunk/user/src/com/google/gwt/logging/LogImpl.gwt.xml
 /trunk/user/super/com/google/gwt/emul/java/util/logging/LogManager.java

===
--- /trunk/user/src/com/google/gwt/logging/impl/LogManagerImpl.java	Thu  
Aug  5 19:03:31 2010

+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2010 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the License); you may  
not
- * use this file except in compliance with the License. You may obtain a  
copy of

- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,  
WITHOUT

- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations  
under

- * the License.
- */
-
-package com.google.gwt.logging.impl;
-
-import java.util.logging.LogManager;
-import java.util.logging.Logger;
-
-/**
- * Interface for the implementation of LogManager. We use a  
LogManagerImplNull

- * to ensure that logging code compiles out when logging is disabled, and a
- * LogManagerImplRegular to provide normal functionality when logging is  
enabled

- */
-public interface LogManagerImpl {
-  boolean addLogger(Logger logger);
-  Logger getLogger(String name);
-  LogManager getLogManager();
-}
===
--- /trunk/user/src/com/google/gwt/logging/impl/LogManagerImplNull.java	Thu  
Aug  5 19:03:31 2010

+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright 2010 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the License); you may  
not
- * use this file except in compliance with the License. You may obtain a  
copy of

- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,  
WITHOUT

- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations  
under

- * the License.
- */
-
-package com.google.gwt.logging.impl;
-
-import java.util.logging.LogManager;
-import java.util.logging.Logger;
-
-/**
- * Implementation for the LogManager class when logging is disabled.
- */
-public class LogManagerImplNull {
-
-  boolean addLogger(Logger logger) {
-return false;
-  }
-
-  Logger getLogger(String name) {
-return null;
-  }
-
-  LogManager getLogManager() {
-return null;
-  }
-}
===
--- /trunk/user/src/com/google/gwt/logging/impl/LogManagerImplRegular.java	 
Thu Aug  5 19:03:31 2010

+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright 2010 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the License); you may  
not
- * use this file except in compliance with the License. You may obtain a  
copy of

- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,  
WITHOUT

- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations  
under

- * the License.
- */
-
-package com.google.gwt.logging.impl;
-
-import java.util.HashMap;
-import java.util.logging.Level;
-import java.util.logging.LogManager;
-import java.util.logging.Logger;
-
-/**
- * Implementation for the LogManager class when logging is enabled.
- */
-public class LogManagerImplRegular {
-
-  /**
-   * Since the Impl class is in a different package than the LogManager  
class,

-   * we need to work around the fact that the Impl class cannot access the
-   * protected constructor.
-   */
-  private static class LogManagerWithExposedConstructor extends LogManager  
{

-public LogManagerWithExposedConstructor() {
-  super();
-}
-  }
-
-  /**
-   * Since the Logger constructor is protected, the LogManager cannot  
create
-   * one directly, so we create a RootLogger which has an exposed  
constructor.

-   */
-  private class RootLogger extends Logger {
-public RootLogger() {
-  super(, null);
-  setLevel(Level.ALL);
-}
-  }
-
-  private static LogManager singleton;
-
-  public static 

[gwt-contrib] [google-web-toolkit] r8474 committed - Always show more link when pager's list view has an inexact item cou...

2010-08-05 Thread codesite-noreply

Revision: 8474
Author: d...@google.com
Date: Tue Aug  3 23:33:14 2010
Log: Always show more link when pager's list view has an inexact item  
count. More should set a range beyond the current datasize if the count is  
inexact.


Review at http://gwt-code-reviews.appspot.com/708803

Review by: jlaba...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=8474

Modified:
 /trunk/user/src/com/google/gwt/user/cellview/client/PageSizePager.java

===
--- /trunk/user/src/com/google/gwt/user/cellview/client/PageSizePager.java	 
Fri Jul  2 09:26:53 2010
+++ /trunk/user/src/com/google/gwt/user/cellview/client/PageSizePager.java	 
Tue Aug  3 23:33:14 2010

@@ -57,8 +57,9 @@
 showMoreButton.addClickHandler(new ClickHandler() {
   public void onClick(ClickEvent event) {
 Range range = listView.getRange();
-int pageSize = Math.min(range.getLength() + increment,
-listView.getDataSize());
+int pageSize = Math.min(
+range.getLength() + increment,
+listView.getDataSize() + (listView.isDataSizeExact() ? 0 :  
increment));

 listView.setRange(range.getStart(), pageSize);
   }
 });
@@ -84,7 +85,7 @@
 // Assumes a page start index of 0.
 int pageSize = listView.getRange().getLength();
 boolean hasLess = pageSize  increment;
-boolean hasMore = pageSize  listView.getDataSize();
+boolean hasMore = !listView.isDataSizeExact() || pageSize   
listView.getDataSize();

 showLessButton.setVisible(hasLess);
 showMoreButton.setVisible(hasMore);
 layout.setText(0, 1, (hasLess  hasMore) ?  |  : );

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r8475 committed - Enhancement for issue 4870...

2010-08-05 Thread codesite-noreply

Revision: 8475
Author: gwt.mirror...@gmail.com
Date: Thu Aug  5 20:35:34 2010
Log: Enhancement for issue 4870

Review at http://gwt-code-reviews.appspot.com/711802

Review by: zun...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=8475

Modified:
 /trunk/user/src/com/google/gwt/user/client/rpc/StatusCodeException.java

===
--- /trunk/user/src/com/google/gwt/user/client/rpc/StatusCodeException.java	 
Thu Apr 10 16:39:57 2008
+++ /trunk/user/src/com/google/gwt/user/client/rpc/StatusCodeException.java	 
Thu Aug  5 20:35:34 2010

@@ -23,16 +23,25 @@
  */
 public class StatusCodeException extends InvocationException {
   private final int statusCode;
+  private final String encodedResponse;

   /**
* Construct an exception with the given status code and description.
*
* @param statusCode the HTTP status code to report
-   * @param message a message to report
+   * @param encodedResponse the HTTP response message to report
*/
-  public StatusCodeException(int statusCode, String message) {
-super(message);
+  public StatusCodeException(int statusCode, String encodedResponse) {
+super(statusCode +   + encodedResponse);
 this.statusCode = statusCode;
+this.encodedResponse = encodedResponse;
+  }
+
+  /**
+   * Returns the response message associated with the failed request.
+   */
+  public String getEncodedResponse() {
+return encodedResponse;
   }

   /**
@@ -42,4 +51,3 @@
 return statusCode;
   }
 }
-

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r8476 committed - Made the error messages thrown in case of GWTTestCase timeouts more in...

2010-08-05 Thread codesite-noreply

Revision: 8476
Author: amitman...@google.com
Date: Wed Aug  4 05:46:33 2010
Log: Made the error messages thrown in case of GWTTestCase timeouts more  
informative, as requested in

http://code.google.com/p/google-web-toolkit/issues/detail?id=4099

Patch by: amitmanjhi
Review by: mmendez

http://code.google.com/p/google-web-toolkit/source/detail?r=8476

Modified:
 /trunk/user/src/com/google/gwt/junit/JUnitShell.java

===
--- /trunk/user/src/com/google/gwt/junit/JUnitShell.java	Fri Jul 30  
07:51:15 2010
+++ /trunk/user/src/com/google/gwt/junit/JUnitShell.java	Wed Aug  4  
05:46:33 2010

@@ -1015,7 +1015,8 @@
 + testBatchingMethodTimeoutMillis
 + ms.\n  We have no results from:\n
 + messageQueue.getWorkingClients(currentTestInfo)
-+ Actual time elapsed:  + elapsed +  seconds.\n);
++ Actual time elapsed:  + elapsed +  seconds.\n
++ Try increasing this timeout using  
the '-testMethodTimeout minutes' option\n);

   }
 } else if (testBeginTimeout  currentTimeMillis) {
   double elapsed = (currentTimeMillis - testBeginTime) / 1000.0;
@@ -1023,7 +1024,9 @@
   The browser did not contact the server within 
   + baseTestBeginTimeoutMillis + ms.\n
   + messageQueue.getUnretrievedClients(currentTestInfo)
-  + \n Actual time elapsed:  + elapsed +  seconds.\n);
+  + \n Actual time elapsed:  + elapsed +  seconds.\n
+  + Try increasing this timeout using the '-testBeginTimeout  
minutes' option\n
+  + The default value of minutes is 1, i.e., the server waits  
1 minute or 60 seconds.\n);

 }

 // Check that we haven't lost communication with a remote host.

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r8477 committed - Fixing the position of the paging controls in the scaffolding app....

2010-08-05 Thread codesite-noreply

Revision: 8477
Author: jlaba...@google.com
Date: Wed Aug  4 07:20:09 2010
Log: Fixing the position of the paging controls in the scaffolding app.

Review at http://gwt-code-reviews.appspot.com/738802

Review by: rj...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=8477

Modified:
  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/employee/EmployeeListView.ui.xml
  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/report/ReportListView.ui.xml


===
---  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/employee/EmployeeListView.ui.xml	 
Mon Jun  7 12:20:31 2010
+++  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/employee/EmployeeListView.ui.xml	 
Wed Aug  4 07:20:09 2010

@@ -9,9 +9,9 @@
   position: absolute;
   left:0;
   right:0;
-  top:0;
+  top: 3px;
   height: 2em;
-  margin-left: 12em;
+  margin-left: 15px;
 }
 @sprite .createButton {
   gwt-image: 'createButton';
@@ -31,6 +31,9 @@
 .controls button {
display:inline;
  }
+ .listView {
+   position: relative;
+ }
  .listView  table {
table-layout:fixed;
  }
===
---  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/report/ReportListView.ui.xml	 
Mon Jun  7 12:20:31 2010
+++  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/report/ReportListView.ui.xml	 
Wed Aug  4 07:20:09 2010

@@ -8,9 +8,9 @@
   position: absolute;
   left:0;
   right:0;
-  top:0;
+  top: 3px;
   height: 2em;
-  margin-left: 12em;
+  margin-left: 15px;
 }
 @sprite .createButton {
   gwt-image: 'createButton';
@@ -30,6 +30,9 @@
 .controls button {
display:inline;
  }
+ .listView {
+   position: relative;
+ }
  .listView  table {
table-layout:fixed;
  }

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r8478 committed - Reintroduce changes from r8440, with a fix to ZipFileResource and upda...

2010-08-05 Thread codesite-noreply

Revision: 8478
Author: gwt.mirror...@gmail.com
Date: Thu Aug  5 21:23:00 2010
Log: Reintroduce changes from r8440, with a fix to ZipFileResource and  
update related tests.


Review at http://gwt-code-reviews.appspot.com/728801

Review by: sco...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=8478

Added:
 /trunk/dev/core/test/com/google/gwt/dev/resource/impl/testdata/cpe1.zip
 /trunk/dev/core/test/com/google/gwt/dev/resource/impl/testdata/cpe2.zip
Deleted:
 /trunk/dev/core/src/com/google/gwt/dev/cfg/PublicOracle.java
Modified:
 /trunk/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java
 /trunk/dev/core/src/com/google/gwt/dev/resource/ResourceOracle.java
 /trunk/dev/core/src/com/google/gwt/dev/resource/impl/AbstractResource.java
  
/trunk/dev/core/src/com/google/gwt/dev/resource/impl/DirectoryClassPathEntry.java

 /trunk/dev/core/src/com/google/gwt/dev/resource/impl/FileResource.java
  
/trunk/dev/core/src/com/google/gwt/dev/resource/impl/ResourceOracleImpl.java
  
/trunk/dev/core/src/com/google/gwt/dev/resource/impl/ZipFileClassPathEntry.java

 /trunk/dev/core/src/com/google/gwt/dev/resource/impl/ZipFileResource.java
  
/trunk/dev/core/test/com/google/gwt/dev/resource/impl/AbstractResourceOrientedTestBase.java
  
/trunk/dev/core/test/com/google/gwt/dev/resource/impl/ClassPathEntryTest.java

 /trunk/dev/core/test/com/google/gwt/dev/resource/impl/FileResourceTest.java
  
/trunk/dev/core/test/com/google/gwt/dev/resource/impl/MockAbstractResource.java
  
/trunk/dev/core/test/com/google/gwt/dev/resource/impl/ResourceOracleImplRealClasspathTest.java
  
/trunk/dev/core/test/com/google/gwt/dev/resource/impl/ResourceOracleImplTest.java

 /trunk/dev/core/test/com/google/gwt/dev/resource/impl/testdata/rebuild_jars

===
--- /dev/null
+++ /trunk/dev/core/test/com/google/gwt/dev/resource/impl/testdata/cpe1.zip	 
Thu Aug  5 21:23:00 2010

@@ -0,0 +1,31 @@
+PK  
+ •VüÁkdò	   	   com/google/gwt/user/User.gwt.xmlUT	 
 :DPL„XLUx  }œˆ test filePK•Vüúy2¯b   | 
  '   com/google/gwt/user/client/Command.javaUT	  :DPLkXXLUx  }œˆ ]Ì1

+Ã0@ÑݧÐ2wìI Y S92–œ%w ¥[æÿø øCE€­a1+*XÎÀ,  q›ƒ këŠ!
+™‚ »¬øàÓe  
k•=^)õ¹ie`%wx[k´gø€e ßæ_Òu PK•VüQë±¼b   z   %   com/google/gwt/user/client/Timer.javaUT	 
 :DPLkXXLUx  }œˆ ]Ì1

+Ã0FáݧÐ2÷ ½€¢ü S96–œ¥w/¥[ÖÇÇë¢/É m•skÙÀù
+Þqò€·9 \j7 xì ÂÚ±ò OÇ`µ‚#
+)õ¹YQR wz–ŠAïD´,ô›ü{ú| 
PK•Vü5¿·Ãb   ~   )   com/google/gwt/user/client/ui/Widget.javaUT	 
 :DPLkXXLUx  }œˆ ]Œ1  1 û¼Â/ð‰š‡P geEøH ;P  
þ è:º‘f4Cô Ò¾³õn ¶grŃ'¢¯©à¶ çDd• Ö  ÿå+0Y½áþåv.e¬«7%u‰ K«†¤W!Ú6ú  QÞ PK  
+ •Vü%   org/example/bar/client/BarClient1.txtUT	 
 :DPL:DPLUx  }œˆ PK  
+ •Vü%   org/example/bar/client/BarClient2.txtUT	 
 :DPL:DPLUx  }œˆ PK  
+ •Vü%   org/example/bar/client/etc/BarEtc.txtUT	 
 :DPL:DPLUx  }œˆ PK•Vü6

+FÑe   z   %   org/example/foo/client/FooClient.javaUT:DPLkXXLUx  }œˆ %ÌM
+Â@ Ðýœ'øŠk—‚÷HÓ  Óf˜IU ïîßúÁk,W6%‰  a®°{bÑ ºŽØ»(êÚ
+©# N†4= ºA ü Å% âU·–ÒöÙ« 8 AçˆÓ èYˆ¦‰¾ÉßÊë
+PK•Vü°{œ¨f   z   %   org/example/foo/server/FooServer.javaUT	 
 :DPLkXXLUx  }œˆ %ÌK Â0 À}Ná ¼Š5{.À	Œû°*R9rÒ‚„¸;¿õHÓÔnê ‹ 
+á•ðûÀÌ

+É
+[ ±¬­b° Y‡Â  ˆtð¡  ® èÌ y,¥m—º˜XÕÞå qþ ‹È4É7ù[y½ PK
+ •VüÁkdò	   	 
+   com/google/gwt/user/User.gwt.xmlUT   :DPLUx  PK  •Vüúy2¯b   | 
  ' 
+   \   com/google/gwt/user/client/Command.javaUT   :DPLUx  PK  •VüQë±¼b   z   % 
+   com/google/gwt/user/client/Timer.javaUT   :DPLUx  PK  •Vü5¿·Ãb   ~   ) 
+   Ò   com/google/gwt/user/client/ui/Widget.javaUT   :DPLUx  PK
+ •Vü% 
+   org/example/bar/client/BarClient1.txtUT   :DPLUx  PK
+ •Vü% 
+   è   org/example/bar/client/BarClient2.txtUT   :DPLUx  PK
+ •Vü% 
+   @   org/example/bar/client/etc/BarEtc.txtUT   :DPLUx  PK  •Vü6
+FÑe   z   % 
+   ˜   org/example/foo/client/FooClient.javaUT   :DPLUx  PK  •Vü°{œ¨f   z   % 
+   U   org/example/foo/server/FooServer.javaUT   :DPLUx  PK  	 
	 a 
===

--- /dev/null
+++ /trunk/dev/core/test/com/google/gwt/dev/resource/impl/testdata/cpe2.zip	 
Thu Aug  5 21:23:00 2010

@@ -0,0 +1,23 @@
+PK  
+ •VüÁkdò	   	   com/google/gwt/i18n/I18N.gwt.xmlUT	 
 :DPL„XLUx  }œˆ test  
filePK•VüÓl öd   }   (   com/google/gwt/i18n/client/Messages.javaUT	 
 :DPLkXXLUx  }œˆ ] 1 Â@ û{

+_° TH¼ G gu:áäN±  âï€è¨g43ÔnZ)Ö ÔÞ« õ‘˜yÇÆèûfD[†# 9k*lðˆ?½
+N+Ì ×—2ö«7 s   #ƒ g ™ùv~¨¼ÞPK•VüX¿jÓm   Š   4   com/google/gwt/i18n/rebind/LocalizableGenerator.javaUT	 
 :DPLkXXLUx  }œˆ ]ÌA

+ 1 À{_‘ dÑ“à ¼ø‰4
+%˜mJ›UPüû*Þ¼ Ó‰oT ØW¬îÕ ë#°È
+‡Lß  êÚ
+Cf 
+BîrÄ?®‡Sûø¬­œSê[6e`£9áêL¦OÊ i2(|À+ , |Ï Kï´ PK  
+ •Vü%   org/example/bar/client/BarClient2.txtUT	 
 :DPL:DPLUx  }œˆ PK  
+ •Vü%   org/example/bar/client/BarClient3.txtUT	 

[gwt-contrib] [google-web-toolkit] r8479 committed - Add two new ClientBundle DataResource annotations:...

2010-08-05 Thread codesite-noreply

Revision: 8479
Author: fre...@google.com
Date: Wed Aug  4 11:09:38 2010
Log: Add two new ClientBundle DataResource annotations:

1. @DoNotEmbed which allows a DataResource to be designated as not  
embeddable
Although in pre IE8, where there is no data URL support, the following test  
is a no-op

DataResourceDoNotEmbedTest#testDoNotEmbedAnnotationMissingShouldEmbed

2. @MimeType(String) which allows a MIME Type to be specified for use in  
embedded resources



Related changes:

3. Allow MIME Types with double quotes as per RFC 4281 e.g. video/3gpp2;  
codecs=sevc, s263


4. While in the neighborhood, adding @Document to ClientBundle's @Source  
annotation


Review at http://gwt-code-reviews.appspot.com/714801

Review by: robertvaw...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=8479

Added:
  
/trunk/user/test/com/google/gwt/resources/client/DataResourceDoNotEmbedTest.java
  
/trunk/user/test/com/google/gwt/resources/client/DataResourceMimeTypeTest.java

 /trunk/user/test/com/google/gwt/resources/client/fourZeros.dat
Modified:
 /trunk/user/src/com/google/gwt/resources/client/ClientBundle.java
 /trunk/user/src/com/google/gwt/resources/client/DataResource.java
 /trunk/user/src/com/google/gwt/resources/ext/ResourceContext.java
  
/trunk/user/src/com/google/gwt/resources/rebind/context/AbstractResourceContext.java
  
/trunk/user/src/com/google/gwt/resources/rebind/context/InlineResourceContext.java
  
/trunk/user/src/com/google/gwt/resources/rebind/context/MhtmlResourceContext.java
  
/trunk/user/src/com/google/gwt/resources/rebind/context/StaticResourceContext.java

 /trunk/user/src/com/google/gwt/resources/rg/DataResourceGenerator.java
 /trunk/user/src/com/google/gwt/resources/rg/ImageResourceGenerator.java
 /trunk/user/test/com/google/gwt/resources/ResourcesSuite.java
 /trunk/user/test/com/google/gwt/resources/rg/CssTestCase.java

===
--- /dev/null
+++  
/trunk/user/test/com/google/gwt/resources/client/DataResourceDoNotEmbedTest.java	 
Wed Aug  4 11:09:38 2010

@@ -0,0 +1,82 @@
+/*
+ * 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;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.junit.client.GWTTestCase;
+
+/**
+ * Tests for {...@link DataResource.DoNotEmbed @DoNotEmbed} resource  
annotations.

+ */
+public class DataResourceDoNotEmbedTest extends GWTTestCase {
+
+  interface Resources extends ClientBundle {
+
+/**
+ * This is a binary file containing four 0x00 bytes, which is small  
enough

+ * to be embeddable, and contains insufficient information for a
+ * determination of a recognizable MIME Type.
+ */
+String FOUR_ZEROS_SOURCE = fourZeros.dat;
+
+// Purposely missing a @DoNotEmbed annotation
+@Source(FOUR_ZEROS_SOURCE)
+DataResource resourceDoNotEmbedAnnotationMissing();
+
+@DataResource.DoNotEmbed
+@Source(FOUR_ZEROS_SOURCE)
+DataResource resourceDoNotEmbedAnnotationPresent();
+  }
+
+  /**
+   * RFC 2397 data URL scheme
+   */
+  private static final String DATA_URL_SCHEME = data:;
+
+  /**
+   * HACK: Older versions of IE do not support RFC 2397 data URLs. See
+   * com/google/gwt/resources/Resources.gwt.xml
+   */
+  private static native boolean isPreIe8() /*-{
+var ua = navigator.userAgent.toLowerCase();
+return ua.indexOf(msie) != -1
+ !(document.documentMode = 8);
+  }-*/;
+
+  @Override
+  public String getModuleName() {
+return com.google.gwt.resources.Resources;
+  }
+
+  public void testDoNotEmbedAnnotationMissingShouldEmbed() {
+if (isPreIe8()) {
+  // Skip this test for browsers which do not support data URLs
+  return;
+}
+Resources r = GWT.create(Resources.class);
+String url = r.resourceDoNotEmbedAnnotationMissing().getUrl();
+assertTrue(url ' + url + ' doesn't start with' + DATA_URL_SCHEME  
+ ',

+url.startsWith(DATA_URL_SCHEME));
+  }
+
+  public void testDoNotEmbedAnnotationPresentShouldNotEmbed() {
+Resources r = GWT.create(Resources.class);
+String url = r.resourceDoNotEmbedAnnotationPresent().getUrl();
+assertFalse(
+url ' + url + ' mustn't start with' + DATA_URL_SCHEME + ',
+url.startsWith(DATA_URL_SCHEME));
+  }
+}
===
--- /dev/null
+++  
/trunk/user/test/com/google/gwt/resources/client/DataResourceMimeTypeTest.java	 
Wed Aug  4 11:09:38 

[gwt-contrib] [google-web-toolkit] r8482 committed - Add logging to scaffold and expenses apps...

2010-08-05 Thread codesite-noreply

Revision: 8482
Author: gwt.mirror...@gmail.com
Date: Wed Aug  4 16:16:12 2010
Log: Add logging to scaffold and expenses apps

Review at http://gwt-code-reviews.appspot.com/725803

Review by: rj...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=8482

Modified:
  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/ExpensesCommon.gwt.xml

 /trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/Scaffold.gwt.xml
  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/ScaffoldCommon.gwt.xml
  
/trunk/user/src/com/google/gwt/requestfactory/client/RequestFactoryLogHandler.java
  
/trunk/user/src/com/google/gwt/requestfactory/client/impl/RequestFactoryJsonImpl.java


===
---  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/ExpensesCommon.gwt.xml	 
Wed Jun  9 09:35:40 2010
+++  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/ExpensesCommon.gwt.xml	 
Wed Aug  4 16:16:12 2010

@@ -6,6 +6,7 @@
   inherits name='com.google.gwt.sample.bikeshed.style.Style'/
   inherits name='com.google.gwt.mobile.Mobile'/
   inherits name='com.google.gwt.user.cellview.CellView'/
+  inherits name='com.google.gwt.logging.Logging'/

   source path='client'/
   source path='request'/
@@ -15,4 +16,16 @@
   !-- Default Locale. --
   extend-property name=locale values=en/
   set-property-fallback name=locale value=en/
+
+  !-- Logging Configuration --
+  set-property name=gwt.logging.enabled value=TRUE/
+  set-property name=gwt.logging.logLevel value=INFO/
+  set-property name=gwt.logging.consoleHandler value=ENABLED /
+  set-property name=gwt.logging.developmentModeHandler value=ENABLED  
/

+  set-property name=gwt.logging.firebugHandler value=ENABLED /
+  set-property name=gwt.logging.hasWidgetsHandler value=DISABLED /
+  set-property name=gwt.logging.popupHandler value=DISABLED /
+  set-property name=gwt.logging.systemHandler value=ENABLED /
+  set-property name=gwt.logging.simpleRemoteHandler value=DISABLED /
+
 /module
===
--- /trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/Scaffold.gwt.xml	 
Wed Jul 28 16:39:40 2010
+++ /trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/Scaffold.gwt.xml	 
Wed Aug  4 16:16:12 2010

@@ -22,17 +22,4 @@
   inherits name=com.google.gwt.sample.expenses.gwt.ExpensesCommon /
   entry-point class=com.google.gwt.sample.expenses.gwt.client.Scaffold  
/


-  !-- Logging Configuration --
-  !-- Right now, App Engine Dev Mode logging is borken for everything  
other

-   than the system handler, so only that one is enabled for now
-  set-property name=gwt.logging.enabled value=TRUE/
-  set-property name=gwt.logging.logLevel value=INFO/
-  set-property name=gwt.logging.consoleHandler value=DISABLED /
-  set-property name=gwt.logging.developmentModeHandler value=DISABLED  
/

-  set-property name=gwt.logging.firebugHandler value=DISABLED /
-  set-property name=gwt.logging.hasWidgetsHandler value=DISABLED /
-  set-property name=gwt.logging.popupHandler value=DISABLED /
-  set-property name=gwt.logging.systemHandler value=ENABLED /
-  set-property name=gwt.logging.simpleRemoteHandler value=DISABLED /
---
 /module
===
---  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/ScaffoldCommon.gwt.xml	 
Mon Jun  7 12:20:31 2010
+++  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/ScaffoldCommon.gwt.xml	 
Wed Aug  4 16:16:12 2010

@@ -6,9 +6,22 @@
   inherits name='com.google.gwt.sample.bikeshed.style.Style'/
   inherits name='com.google.gwt.mobile.Mobile'/
   inherits name='com.google.gwt.user.cellview.CellView'/
-
+  inherits name='com.google.gwt.logging.Logging'/
+
   source path='client'/
   source path='request'/
   source path='place'/
   source path='ui'/
+
+  !-- Logging Configuration --
+  set-property name=gwt.logging.enabled value=TRUE/
+  set-property name=gwt.logging.logLevel value=INFO/
+  set-property name=gwt.logging.consoleHandler value=ENABLED /
+  set-property name=gwt.logging.developmentModeHandler value=ENABLED  
/

+  set-property name=gwt.logging.firebugHandler value=ENABLED /
+  set-property name=gwt.logging.hasWidgetsHandler value=DISABLED /
+  set-property name=gwt.logging.popupHandler value=DISABLED /
+  set-property name=gwt.logging.systemHandler value=ENABLED /
+  set-property name=gwt.logging.simpleRemoteHandler value=DISABLED /
+
 /module
===
---  
/trunk/user/src/com/google/gwt/requestfactory/client/RequestFactoryLogHandler.java	 
Fri Jul 30 07:51:15 2010
+++  
/trunk/user/src/com/google/gwt/requestfactory/client/RequestFactoryLogHandler.java	 
Wed Aug  4 16:16:12 2010

@@ -20,8 +20,6 @@
 import com.google.gwt.requestfactory.shared.RequestFactory;
 import com.google.gwt.valuestore.shared.SyncResult;

-import java.util.ArrayList;
-import java.util.List;
 import java.util.Set;
 import java.util.logging.Handler;
 import java.util.logging.Level;
@@ -46,59 +44,51 @@
 

[gwt-contrib] [google-web-toolkit] r8483 committed - Add login widgets to Expenses and the Mobile versions...

2010-08-05 Thread codesite-noreply

Revision: 8483
Author: unn...@google.com
Date: Wed Aug  4 17:46:23 2010
Log: Add login widgets to Expenses and the Mobile versions

Review at http://gwt-code-reviews.appspot.com/713802

Review by: rj...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=8483

Modified:
 /trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/Expenses.java
  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpensesMobile.java
  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpensesMobileShell.java
  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpensesMobileShell.ui.xml
  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpensesShell.java
  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpensesShell.ui.xml
  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ScaffoldMobile.java
  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ScaffoldMobileShell.java
  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ScaffoldMobileShell.ui.xml

 /trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/mobile.css

===
---  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/Expenses.java	 
Mon Jun  7 12:20:31 2010
+++  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/Expenses.java	 
Wed Aug  4 17:46:23 2010

@@ -18,6 +18,11 @@
 import com.google.gwt.core.client.EntryPoint;
 import com.google.gwt.core.client.GWT;
 import com.google.gwt.event.shared.HandlerManager;
+import com.google.gwt.requestfactory.client.AuthenticationFailureHandler;
+import com.google.gwt.requestfactory.client.LoginWidget;
+import com.google.gwt.requestfactory.shared.Receiver;
+import com.google.gwt.requestfactory.shared.RequestEvent;
+import com.google.gwt.requestfactory.shared.UserInformationRecord;
 import com.google.gwt.resources.client.ImageResource;
 import com.google.gwt.sample.bikeshed.style.client.Styles;
 import com.google.gwt.sample.expenses.gwt.request.EmployeeRecord;
@@ -26,10 +31,14 @@
 import com.google.gwt.sample.expenses.gwt.request.ExpensesRequestFactory;
 import com.google.gwt.sample.expenses.gwt.request.ReportRecord;
 import com.google.gwt.sample.expenses.gwt.request.ReportRecordChanged;
+import com.google.gwt.user.client.Window.Location;
 import com.google.gwt.user.client.ui.AbstractImagePrototype;
 import com.google.gwt.user.client.ui.RootLayoutPanel;
+import com.google.gwt.valuestore.shared.SyncResult;
 import com.google.gwt.view.client.ProvidesKey;

+import java.util.Set;
+
 /**
  * Entry point for the Expenses app.
  */
@@ -133,6 +142,19 @@
 final ExpenseDetails expenseDetails = shell.getExpenseDetails();

 root.add(shell);
+
+// Check for Authentication failures or mismatches
+eventBus.addHandler(RequestEvent.TYPE, new  
AuthenticationFailureHandler());

+
+// Add a login widget to the page
+final LoginWidget login = shell.getLoginWidget();
+ReceiverUserInformationRecord receiver = new  
ReceiverUserInformationRecord() {
+  public void onSuccess(UserInformationRecord userInformationRecord,  
SetSyncResult syncResults) {

+login.setUserInformation(userInformationRecord);
+  }
+ };
+ requestFactory.userInformationRequest().getCurrentUserInformation(
+ Location.getHref()).fire(receiver);

 // Listen for requests from ExpenseTree.
 expenseTree.setListener(new ExpenseTree.Listener() {
===
---  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpensesMobile.java	 
Mon Jun  7 12:20:31 2010
+++  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpensesMobile.java	 
Wed Aug  4 17:46:23 2010

@@ -18,10 +18,19 @@
 import com.google.gwt.core.client.EntryPoint;
 import com.google.gwt.core.client.GWT;
 import com.google.gwt.event.shared.HandlerManager;
+import com.google.gwt.requestfactory.client.AuthenticationFailureHandler;
+import com.google.gwt.requestfactory.client.LoginWidget;
+import com.google.gwt.requestfactory.shared.Receiver;
+import com.google.gwt.requestfactory.shared.RequestEvent;
+import com.google.gwt.requestfactory.shared.UserInformationRecord;
 import com.google.gwt.sample.expenses.gwt.request.ExpensesRequestFactory;
 import com.google.gwt.user.client.Window;
+import com.google.gwt.user.client.Window.Location;
 import com.google.gwt.user.client.ui.Label;
 import com.google.gwt.user.client.ui.RootPanel;
+import com.google.gwt.valuestore.shared.SyncResult;
+
+import java.util.Set;

 /**
  * Entry point for the mobile version of the Expenses app.
@@ -86,5 +95,18 @@
 final ExpensesMobileShell shell = new ExpensesMobileShell(eventBus,
 requestFactory, employeeId);
 RootPanel.get().add(shell);
+
+// Check for Authentication failures or mismatches
+eventBus.addHandler(RequestEvent.TYPE, new  
AuthenticationFailureHandler());

+
+// Add a login widget to the page
+final 

[gwt-contrib] [google-web-toolkit] r8484 committed - Fix support for null fields and Boolean type types in RequestFactory....

2010-08-05 Thread codesite-noreply

Revision: 8484
Author: cromwell...@google.com
Date: Wed Aug  4 22:08:44 2010
Log: Fix support for null fields and Boolean type types in RequestFactory.
Null fix patch by icsy

Review at http://gwt-code-reviews.appspot.com/739801

Review by: amitman...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=8484

Added:
  
/trunk/user/src/com/google/gwt/requestfactory/client/impl/AbstractBooleanRequest.java

Modified:
  
/trunk/user/src/com/google/gwt/requestfactory/rebind/RequestFactoryGenerator.java
  
/trunk/user/src/com/google/gwt/requestfactory/server/JsonRequestProcessor.java

 /trunk/user/src/com/google/gwt/valuestore/shared/impl/RecordJsoImpl.java
  
/trunk/user/test/com/google/gwt/requestfactory/server/JsonRequestProcessorTest.java

 /trunk/user/test/com/google/gwt/valuestore/server/SimpleFoo.java
 /trunk/user/test/com/google/gwt/valuestore/shared/SimpleFooRecord.java
  
/trunk/user/test/com/google/gwt/valuestore/shared/impl/SimpleFooRecordImpl.java


===
--- /dev/null
+++  
/trunk/user/src/com/google/gwt/requestfactory/client/impl/AbstractBooleanRequest.java	 
Wed Aug  4 22:08:44 2010

@@ -0,0 +1,48 @@
+/*
+ * 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.client.impl;
+
+import com.google.gwt.valuestore.shared.SyncResult;
+
+import java.util.Collections;
+
+/**
+ * p
+ * span style=color:redExperimental API: This class is still under  
rapid

+ * development, and is very likely to be deleted. Use it at your own risk.
+ * /span
+ * /p
+ * Abstract implementation of
+ * {...@link com.google.gwt.requestfactory.shared.RequestFactory.RequestObject
+ * RequestFactory.RequestObject} for requests that return Boolean.
+ */
+public abstract class AbstractBooleanRequest extends
+AbstractRequestBoolean, AbstractBooleanRequest {
+
+  public AbstractBooleanRequest(RequestFactoryJsonImpl requestFactory) {
+super(requestFactory);
+  }
+
+  public void handleResponseText(String responseText) {
+receiver.onSuccess(Boolean.valueOf(responseText),
+Collections.SyncResult emptySet());
+  }
+
+  @Override
+  protected AbstractBooleanRequest getThis() {
+return this;
+  }
+}
===
---  
/trunk/user/src/com/google/gwt/requestfactory/rebind/RequestFactoryGenerator.java	 
Mon Aug  2 15:57:18 2010
+++  
/trunk/user/src/com/google/gwt/requestfactory/rebind/RequestFactoryGenerator.java	 
Wed Aug  4 22:08:44 2010

@@ -28,6 +28,7 @@
 import com.google.gwt.core.ext.typeinfo.NotFoundException;
 import com.google.gwt.core.ext.typeinfo.TypeOracle;
 import com.google.gwt.event.shared.HandlerManager;
+import com.google.gwt.requestfactory.client.impl.AbstractBooleanRequest;
 import com.google.gwt.requestfactory.client.impl.AbstractBigDecimalRequest;
 import com.google.gwt.requestfactory.client.impl.AbstractBigIntegerRequest;
 import com.google.gwt.requestfactory.client.impl.AbstractByteRequest;
@@ -445,6 +446,8 @@
 requestClassName = AbstractDoubleRequest.class.getName();
   } else if (isByteRequest(typeOracle, requestType)) {
 requestClassName = AbstractByteRequest.class.getName();
+  } else if (isBooleanRequest(typeOracle, requestType)) {
+requestClassName = AbstractBooleanRequest.class.getName();
   } else if (isShortRequest(typeOracle, requestType)) {
 requestClassName = AbstractShortRequest.class.getName();
   } else if (isFloatRequest(typeOracle, requestType)) {
@@ -551,6 +554,10 @@
   JClassType requestType) {
 return  
requestType.isParameterized().getTypeArgs()[0].isAssignableTo(typeOracle.findType(BigInteger.class.getName()));

   }
+
+  private boolean isBooleanRequest(TypeOracle typeOracle, JClassType  
requestType) {
+return  
requestType.isParameterized().getTypeArgs()[0].isAssignableTo(typeOracle.findType(Boolean.class.getName()));

+  }

   private boolean isByteRequest(TypeOracle typeOracle, JClassType  
requestType) {
 return  
requestType.isParameterized().getTypeArgs()[0].isAssignableTo(typeOracle.findType(Byte.class.getName()));

===
---  
/trunk/user/src/com/google/gwt/requestfactory/server/JsonRequestProcessor.java	 
Mon Aug  2 10:40:29 2010
+++  
/trunk/user/src/com/google/gwt/requestfactory/server/JsonRequestProcessor.java	 
Wed Aug  4 22:08:44 2010

@@ -123,6 +123,9 @@
 if (String.class == parameterType) {
   

[gwt-contrib] [google-web-toolkit] r8485 committed - Allowing DefaultSuggestionDisplay to stay open even when empty (no sug...

2010-08-05 Thread codesite-noreply

Revision: 8485
Author: porte...@google.com
Date: Thu Aug  5 05:32:03 2010
Log: Allowing DefaultSuggestionDisplay to stay open even when empty (no  
suggestions).


Review at http://gwt-code-reviews.appspot.com/698803

Review by: jlaba...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=8485

Modified:
 /trunk/user/src/com/google/gwt/user/client/ui/SuggestBox.java

===
--- /trunk/user/src/com/google/gwt/user/client/ui/SuggestBox.java	Mon Mar  
29 09:42:22 2010
+++ /trunk/user/src/com/google/gwt/user/client/ui/SuggestBox.java	Thu Aug   
5 05:32:03 2010

@@ -276,6 +276,14 @@
  * partner.
  */
 private SuggestBox lastSuggestBox = null;
+
+/**
+ * Sub-classes making use of {...@link decorateSuggestionList} to add
+ * elements to the suggestion popup _may_ want those elements to show  
even

+ * when there are 0 suggestions. An example would be showing a No
+ * matches message.
+ */
+private boolean hideWhenEmpty = true;

 /**
  * Construct a new {...@link DefaultSuggestionDisplay}.
@@ -294,6 +302,16 @@
 public boolean isAnimationEnabled() {
   return suggestionPopup.isAnimationEnabled();
 }
+
+/**
+ * Check whether or not the suggestion list is hidden when there are no
+ * suggestions to display.
+ *
+ * @return true if hidden when empty, false if not
+ */
+public boolean isSuggestionListHiddenWhenEmpty() {
+  return hideWhenEmpty;
+}

 /**
  * Check whether or not the list of suggestions is being shown.
@@ -318,6 +336,16 @@
   suggestionPopup.setStyleName(style);
 }

+/**
+ * Set whether or not the suggestion list should be hidden when there  
are

+ * no suggestions to display. Defaults to true.
+ *
+ * @param hideWhenEmpty true to hide when empty, false not to
+ */
+public void setSuggestionListHiddenWhenEmpty(boolean hideWhenEmpty) {
+  this.hideWhenEmpty = hideWhenEmpty;
+}
+
 /**
  * Create the PopupPanel that will hold the list of suggestions.
  *
@@ -412,7 +440,8 @@
 boolean isDisplayStringHTML, boolean isAutoSelectEnabled,
 final SuggestionCallback callback) {
   // Hide the popup if there are no suggestions to display.
-  if (suggestions == null || suggestions.size() == 0) {
+  boolean anySuggestions = (suggestions != null  suggestions.size()  

0);

+  if (!anySuggestions  hideWhenEmpty) {
 hideSuggestions();
 return;
   }
@@ -438,7 +467,7 @@
 suggestionMenu.addItem(menuItem);
   }

-  if (isAutoSelectEnabled) {
+  if (isAutoSelectEnabled  anySuggestions) {
 // Select the first item in the suggestion menu.
 suggestionMenu.selectItem(0);
   }

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r8487 committed - Moved the create method from DeltaValueStore, used Long futureIds. Del...

2010-08-05 Thread codesite-noreply

Revision: 8487
Author: amitman...@google.com
Date: Thu Aug  5 10:04:19 2010
Log: Moved the create method from DeltaValueStore, used Long futureIds.  
Deleted ValueStore interface and made ValueStoreJsonImpl non-public.


Patch by: amitmanjhi
Review by: rjrjr (desk review)

Review at http://gwt-code-reviews.appspot.com/721805

http://code.google.com/p/google-web-toolkit/source/detail?r=8487

Deleted:
 /trunk/user/src/com/google/gwt/valuestore/shared/ValueStore.java
Modified:
  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/MobileExpenseEntry.java
  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/MobileReportEntry.java
  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/employee/EmployeeEditActivity.java
  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/report/ReportEditActivity.java

 /trunk/user/src/com/google/gwt/app/place/AbstractRecordEditActivity.java
  
/trunk/user/src/com/google/gwt/requestfactory/client/impl/AbstractRequest.java
  
/trunk/user/src/com/google/gwt/requestfactory/client/impl/DeltaValueStoreJsonImpl.java

 /trunk/user/src/com/google/gwt/requestfactory/client/impl/RecordKey.java
  
/trunk/user/src/com/google/gwt/requestfactory/client/impl/RequestFactoryJsonImpl.java
  
/trunk/user/src/com/google/gwt/requestfactory/client/impl/ValueStoreJsonImpl.java
  
/trunk/user/src/com/google/gwt/requestfactory/rebind/RequestFactoryGenerator.java

 /trunk/user/src/com/google/gwt/requestfactory/shared/DeltaValueStore.java
 /trunk/user/src/com/google/gwt/requestfactory/shared/RequestFactory.java
 /trunk/user/src/com/google/gwt/valuestore/client/SyncResultImpl.java
 /trunk/user/src/com/google/gwt/valuestore/shared/SyncResult.java
  
/trunk/user/test/com/google/gwt/requestfactory/client/impl/DeltaValueStoreJsonImplTest.java


===
--- /trunk/user/src/com/google/gwt/valuestore/shared/ValueStore.java	Wed  
Jul 28 16:39:40 2010

+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2010 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the License); you may  
not
- * use this file except in compliance with the License. You may obtain a  
copy of

- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,  
WITHOUT

- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations  
under

- * the License.
- */
-package com.google.gwt.valuestore.shared;
-
-/**
- * p
- * span style=color:redExperimental API: This class is still under  
rapid

- * development, and is very likely to be deleted. Use it at your own risk.
- * /span
- * /p
- * A store of records with properties.
- */
-public interface ValueStore {
-  /**
-   * Most validations are per field or per id and set via annotation.
-   */
-  void addValidation(/* what's a validation. JSR 303? Learn from Pectin?  
*/);

-
-}
===
---  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/MobileExpenseEntry.java	 
Fri Jul 30 17:29:09 2010
+++  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/MobileExpenseEntry.java	 
Thu Aug  5 10:04:19 2010

@@ -74,9 +74,9 @@
   }

   public void create(Long reportId) {
+expense = (ExpenseRecord) requestFactory.create(ExpenseRecord.class);
 requestObject = requestFactory.expenseRequest().persist();
 DeltaValueStore deltas = requestObject.getDeltaValueStore();
-expense = (ExpenseRecord) deltas.create(ExpenseRecord.class);
 deltas.set(ExpenseRecord.reportId, expense, reportId);
 displayExpense();
   }
===
---  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/MobileReportEntry.java	 
Fri Jul 30 11:32:15 2010
+++  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/MobileReportEntry.java	 
Thu Aug  5 10:04:19 2010

@@ -84,9 +84,9 @@
   }

   public void create(Long reporterId) {
+report = (ReportRecord) requestFactory.create(ReportRecord.class);
 requestObject = requestFactory.reportRequest().persist();
 DeltaValueStore deltas = requestObject.getDeltaValueStore();
-report = (ReportRecord) deltas.create(ReportRecord.class);
 deltas.set(ReportRecord.reporterKey, report, reporterId.toString());
 displayReport();
   }
===
---  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/employee/EmployeeEditActivity.java	 
Fri Jul 30 17:29:09 2010
+++  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/employee/EmployeeEditActivity.java	 
Thu Aug  5 10:04:19 2010

@@ -58,7 +58,7 @@
   public EmployeeEditActivity(Long id, RecordEditViewEmployeeRecord view,
   ExpensesRequestFactory requests,
   PlaceControllerScaffoldPlace placeController) {
-super(view, id, 

[gwt-contrib] [google-web-toolkit] r8488 committed - First pass at keyboard navigation (currently only for CellTable)...

2010-08-05 Thread codesite-noreply

Revision: 8488
Author: r...@google.com
Date: Thu Aug  5 10:37:27 2010
Log: First pass at keyboard navigation (currently only for CellTable)

Review at http://gwt-code-reviews.appspot.com/710802

Review by: jlaba...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=8488

Modified:
 /trunk/user/src/com/google/gwt/cell/client/AbstractCell.java
 /trunk/user/src/com/google/gwt/cell/client/Cell.java
 /trunk/user/src/com/google/gwt/cell/client/CheckboxCell.java
 /trunk/user/src/com/google/gwt/cell/client/EditTextCell.java
 /trunk/user/src/com/google/gwt/cell/client/IconCellDecorator.java
 /trunk/user/src/com/google/gwt/user/cellview/client/CellBrowser.java
 /trunk/user/src/com/google/gwt/user/cellview/client/CellList.java
 /trunk/user/src/com/google/gwt/user/cellview/client/CellTable.java
 /trunk/user/src/com/google/gwt/user/cellview/client/CellTreeNodeView.java
 /trunk/user/src/com/google/gwt/user/cellview/client/Column.java
  
/trunk/user/src/com/google/gwt/user/cellview/client/PagingListViewPresenter.java

 /trunk/user/test/com/google/gwt/cell/client/CheckboxCellTest.java
 /trunk/user/test/com/google/gwt/cell/client/EditTextCellTest.java
  
/trunk/user/test/com/google/gwt/user/cellview/client/PagingListViewPresenterTest.java


===
--- /trunk/user/src/com/google/gwt/cell/client/AbstractCell.java	Tue Jul 27  
08:47:38 2010
+++ /trunk/user/src/com/google/gwt/cell/client/AbstractCell.java	Thu Aug  5  
10:37:27 2010

@@ -75,6 +75,14 @@
   public boolean handlesSelection() {
 return false;
   }
+
+  /**
+   * Returns false. Subclasses that support editing should override this  
method

+   * to return the current editing status.
+   */
+  public boolean isEditing(Element element, C value, Object key) {
+return false;
+  }

   /**
* {...@inheritdoc}
===
--- /trunk/user/src/com/google/gwt/cell/client/Cell.java	Tue Jul 27  
08:47:38 2010
+++ /trunk/user/src/com/google/gwt/cell/client/Cell.java	Thu Aug  5  
10:37:27 2010

@@ -61,6 +61,18 @@
*/
   boolean handlesSelection();

+  /**
+   * Returns true if the cell is currently editing the data identified by  
the
+   * given element and key. While a cell is editing, widgets containing  
the cell
+   * may chooses to pass keystrokes directly to the cell rather than using  
them

+   * for navigation purposes.
+   *
+   * @param parent the parent Element
+   * @param value the value associated with the cell
+   * @param key the unique key associated with the row object
+   */
+  boolean isEditing(Element parent, C value, Object key);
+
   /**
* Handle a browser event that took place within the cell. The default
* implementation returns null.
@@ -77,7 +89,6 @@
   /**
* Render a cell as HTML into a StringBuilder, suitable for passing to
* {...@link Element#setInnerHTML} on a container element.
-   *
* @param value the cell value to be rendered
* @param key the unique key associated with the row object
* @param sb the StringBuilder to be written to
===
--- /trunk/user/src/com/google/gwt/cell/client/CheckboxCell.java	Tue Jul 27  
08:47:38 2010
+++ /trunk/user/src/com/google/gwt/cell/client/CheckboxCell.java	Thu Aug  5  
10:37:27 2010

@@ -18,9 +18,11 @@
 import com.google.gwt.dom.client.Element;
 import com.google.gwt.dom.client.InputElement;
 import com.google.gwt.dom.client.NativeEvent;
+import com.google.gwt.event.dom.client.KeyCodes;

 /**
- * A {...@link Cell} used to render a checkbox.
+ * A {...@link Cell} used to render a checkbox.  The value of the checkbox
+ * may be toggled using the ENTER key as well as via mouse click.
  *
  * p
  * Note: This class is new and its interface subject to change.
@@ -43,7 +45,7 @@
* @param isSelectBox true if the cell controls the selection state
*/
   public CheckboxCell(boolean isSelectBox) {
-super(change);
+super(change, keyup);
 this.isSelectBox = isSelectBox;
   }

@@ -61,9 +63,19 @@
   public void onBrowserEvent(Element parent, Boolean value, Object key,
   NativeEvent event, ValueUpdaterBoolean valueUpdater) {
 String type = event.getType();
-if (change.equals(type)) {
+
+boolean enterPressed = keyup.equals(type) 
+event.getKeyCode() == KeyCodes.KEY_ENTER;
+if (change.equals(type) || enterPressed) {
   InputElement input = parent.getFirstChild().cast();
   Boolean isChecked = input.isChecked();
+
+  // If the enter key was pressed, toggle the value
+  if (enterPressed) {
+isChecked = !isChecked;
+input.setChecked(isChecked);
+  }
+
   setViewData(key, isChecked);
   if (valueUpdater != null) {
 valueUpdater.update(isChecked);
===
--- /trunk/user/src/com/google/gwt/cell/client/EditTextCell.java	Mon Aug  2  
11:31:26 2010
+++ /trunk/user/src/com/google/gwt/cell/client/EditTextCell.java	Thu Aug  5  
10:37:27 2010

@@ -123,7 

[gwt-contrib] [google-web-toolkit] r8489 committed - Removed trim in ValueBoxBase, forcing parsers to handle trim()ing....

2010-08-05 Thread codesite-noreply

Revision: 8489
Author: p...@google.com
Date: Thu Aug  5 10:38:17 2010
Log: Removed trim in ValueBoxBase, forcing parsers to handle trim()ing.

Added test for ValueBoxBase, specifically (instead of a test of TextBox as  
before.) The tests include a test for exceptions and a test to make sure  
strings with spaces are correctly passed through.


Review at http://gwt-code-reviews.appspot.com/738801

Review by: knor...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=8489

Added:
 /trunk/user/test/com/google/gwt/user/client/ui/MockParser.java
 /trunk/user/test/com/google/gwt/user/client/ui/ValueBoxBaseTest.java
Modified:
 /trunk/user/src/com/google/gwt/user/client/ui/ValueBoxBase.java

===
--- /dev/null
+++ /trunk/user/test/com/google/gwt/user/client/ui/MockParser.java	Thu Aug   
5 10:38:17 2010

@@ -0,0 +1,35 @@
+/*
+ * Copyright 2010 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License); you may  
not
+ * use this file except in compliance with the License. You may obtain a  
copy of

+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,  
WITHOUT

+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations  
under

+ * the License.
+ */
+package com.google.gwt.user.client.ui;
+
+import com.google.gwt.text.shared.Parser;
+
+import java.text.ParseException;
+
+class MockParser implements ParserString {
+  public boolean throwException;
+  public boolean parseCalled;
+
+  public String parse(CharSequence text) throws ParseException {
+parseCalled = true;
+
+if (throwException) {
+  throw new ParseException(mock exception, 0);
+} else {
+  return text.toString();
+}
+  }
+}
===
--- /dev/null
+++ /trunk/user/test/com/google/gwt/user/client/ui/ValueBoxBaseTest.java	 
Thu Aug  5 10:38:17 2010

@@ -0,0 +1,99 @@
+/*
+ * Copyright 2010 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License); you may  
not
+ * use this file except in compliance with the License. You may obtain a  
copy of

+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,  
WITHOUT

+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations  
under

+ * the License.
+ */
+package com.google.gwt.user.client.ui;
+
+import com.google.gwt.dom.client.Document;
+import com.google.gwt.dom.client.Element;
+import com.google.gwt.junit.client.GWTTestCase;
+import com.google.gwt.text.shared.PassthroughRenderer;
+import com.google.gwt.text.shared.Renderer;
+
+import java.text.ParseException;
+
+/**
+ * Testing ValueBoxBase.
+ */
+public class ValueBoxBaseTest extends GWTTestCase {
+
+  // Test that parser exceptions are correctly thrown with an empty string
+  public void testParserExceptionWithEmptyString() {
+Element elm = Document.get().createTextInputElement();
+RendererString renderer = PassthroughRenderer.instance();
+MockParser parser = new MockParser();
+
+ValueBoxBaseString valueBoxBase =
+  new ValueBoxBaseString(elm, renderer, parser);
+
+parser.throwException = true;
+valueBoxBase.setText();
+try {
+  String string = valueBoxBase.getValueOrThrow();
+  fail(Should have thrown ParseException);
+} catch (ParseException e) {
+  // exception was correctly thrown
+}
+if (!parser.parseCalled) {
+  fail(Parser was not run);
+}
+  }
+
+  // Test that parser exceptions are correctly thrown with a simple string
+  public void testParserExceptionWithString() {
+Element elm = Document.get().createTextInputElement();
+RendererString renderer = PassthroughRenderer.instance();
+MockParser parser = new MockParser();
+
+ValueBoxBaseString valueBoxBase =
+  new ValueBoxBaseString(elm, renderer, parser);
+
+parser.throwException = true;
+valueBoxBase.setText(simple string);
+try {
+  String string = valueBoxBase.getValueOrThrow();
+  fail(Should have thrown ParseException);
+} catch (ParseException e) {
+  // exception was correctly thrown
+}
+if (!parser.parseCalled) {
+  fail(Parser was not run);
+}
+  }
+
+  // Test that a string with padding spaces correctly passes through
+  public void testSpaces() {
+Element elm = Document.get().createTextInputElement();
+RendererString renderer = PassthroughRenderer.instance();
+MockParser parser = new MockParser();
+
+ValueBoxBaseString valueBoxBase =
+  new ValueBoxBaseString(elm, renderer, parser);
+
+

[gwt-contrib] [google-web-toolkit] r8490 committed - Fix RPC charset parameter tests to be consistent with ServletResponse#...

2010-08-05 Thread codesite-noreply

Revision: 8490
Author: fre...@google.com
Date: Thu Aug  5 13:36:54 2010
Log: Fix RPC charset parameter tests to be consistent with  
ServletResponse#getCharacterEncoding(),
i.e. return only the charset (e.g. 'UTF-8') and do not include the  
Content-Type charset parameter (e.g. 'charset=UTF-8')
See  
http://tomcat.apache.org/tomcat-5.5-doc/servletapi/javax/servlet/ServletResponse.html#getCharacterEncoding()


Review at http://gwt-code-reviews.appspot.com/723803

Review by: amitman...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=8490

Modified:
 /trunk/user/test/com/google/gwt/user/server/rpc/RPCServletUtilsTest.java

===
---  
/trunk/user/test/com/google/gwt/user/server/rpc/RPCServletUtilsTest.java	 
Mon Aug  2 20:55:43 2010
+++  
/trunk/user/test/com/google/gwt/user/server/rpc/RPCServletUtilsTest.java	 
Thu Aug  5 13:36:54 2010

@@ -53,7 +53,7 @@

 @Override
 public String getCharacterEncoding() {
-  return charset=utf-8;
+  return utf-8;
 }

 @Override
@@ -174,7 +174,7 @@

   @Override
   public String getCharacterEncoding() {
-return charset=EBCDIC-US;
+return EBCDIC-US;
   }
 };

@@ -197,7 +197,7 @@

   @Override
   public String getCharacterEncoding() {
-return charset=EBCDIC-US;
+return EBCDIC-US;
   }
 };
 boolean gotException = false;

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r8492 committed - Another step towards making instance methods real. The interface on th...

2010-08-05 Thread codesite-noreply

Revision: 8492
Author: gwt.mirror...@gmail.com
Date: Thu Aug  5 21:58:49 2010
Log: Another step towards making instance methods real. The interface on  
the client is pretty much what it needs to be.


EmployeeRequest has a method like
RequestObjectVoid remove(EmployeeRecord record);

However, there is a hack in place to get it to work on the server. (The  
hack was already there, this patch just moves it around.)


Patch by: amitmanjhi
Review by: rjrjr (desk review)

Review at http://gwt-code-reviews.appspot.com/710803

http://code.google.com/p/google-web-toolkit/source/detail?r=8492

Added:
 /trunk/user/src/com/google/gwt/requestfactory/shared/RequestData.java
Deleted:
  
/trunk/user/src/com/google/gwt/requestfactory/shared/impl/JsonRequestDataUtil.java

Modified:
  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpenseDetails.java
  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/MobileReportEntry.java
  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/request/EmployeeRequest.java
  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/request/ReportRequest.java
  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/employee/EmployeeDetailsActivity.java
  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/employee/EmployeeEditActivity.java
  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/report/ReportDetailsActivity.java
  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/report/ReportEditActivity.java

 /trunk/user/src/com/google/gwt/app/place/AbstractRecordEditActivity.java
  
/trunk/user/src/com/google/gwt/requestfactory/client/impl/RequestFactoryJsonImpl.java
  
/trunk/user/src/com/google/gwt/requestfactory/rebind/RequestFactoryGenerator.java
  
/trunk/user/src/com/google/gwt/requestfactory/server/JsonRequestProcessor.java
  
/trunk/user/src/com/google/gwt/requestfactory/server/RequestFactoryServlet.java
  
/trunk/user/src/com/google/gwt/requestfactory/server/SampleDataPopulator.java

 /trunk/user/src/com/google/gwt/requestfactory/shared/RequestObject.java
  
/trunk/user/src/com/google/gwt/requestfactory/shared/impl/RequestDataManager.java
  
/trunk/user/test/com/google/gwt/requestfactory/server/JsonRequestProcessorTest.java


===
--- /dev/null
+++ /trunk/user/src/com/google/gwt/requestfactory/shared/RequestData.java	 
Thu Aug  5 21:58:49 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.requestfactory.shared;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * p
+ * span style=color:redExperimental API: This class is still under  
rapid

+ * development, and is very likely to be deleted. Use it at your own risk.
+ * /span
+ * /p
+ * A class that encapsulates the parameters and method name to be invoked  
on the

+ * server.
+ *
+ * TODO: add appropriate unit tests.
+ */
+public class RequestData {
+
+  public static final String CONTENT_TOKEN = contentData;
+  public static final String OPERATION_TOKEN = operation;
+  public static final String PARAM_TOKEN = param;
+
+  // TODO: non-final is a hack for now.
+  private String operation;
+  private final Object[] parameters;
+
+  public RequestData(String operation, Object[] parameters) {
+this.operation = operation;
+this.parameters = parameters;
+  }
+
+  /**
+   * Returns the string that encodes the request data.
+   *
+   */
+  public MapString, String getRequestMap(String contentData) {
+MapString, String requestMap = new HashMapString, String();
+// nasty hack, remove.
+if (operation.endsWith(persist) || operation.endsWith(remove)) {
+  operation = RequestFactory.SYNC;
+}
+requestMap.put(OPERATION_TOKEN, operation);
+if (parameters != null) {
+  for (int i = 0; i  parameters.length; i++) {
+Object value = parameters[i];
+requestMap.put(PARAM_TOKEN + i, value.toString());
+  }
+}
+if (contentData != null) {
+  requestMap.put(CONTENT_TOKEN, contentData);
+}
+return requestMap;
+  }
+}
===
---  
/trunk/user/src/com/google/gwt/requestfactory/shared/impl/JsonRequestDataUtil.java	 
Fri Jul 30 17:29:09 2010

+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2010 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the License); you may  
not
- * use this file except in compliance with the License. You 

[gwt-contrib] [google-web-toolkit] r8493 committed - Add missing .css files for CellTable

2010-08-05 Thread codesite-noreply

Revision: 8493
Author: r...@google.com
Date: Thu Aug  5 15:31:06 2010
Log: Add missing .css files for CellTable

http://code.google.com/p/google-web-toolkit/source/detail?r=8493

Modified:
 /trunk/user/src/com/google/gwt/user/cellview/client/CellTable.css
 /trunk/user/src/com/google/gwt/user/cellview/client/CellTableClean.css

===
--- /trunk/user/src/com/google/gwt/user/cellview/client/CellTable.css	Mon  
Jun  7 12:20:31 2010
+++ /trunk/user/src/com/google/gwt/user/cellview/client/CellTable.css	Thu  
Aug  5 15:31:06 2010

@@ -65,6 +65,14 @@
 .hoveredRow {
   background-color: #88b0f2;
 }
+
+.keyboardSelectedRow {
+
+}
+
+.keyboardSelectedCell {
+
+}

 @sprite .selectedRow {
   gwt-image: 'cellTableSelectedBackground';
===
--- /trunk/user/src/com/google/gwt/user/cellview/client/CellTableClean.css	 
Mon Jun  7 12:20:31 2010
+++ /trunk/user/src/com/google/gwt/user/cellview/client/CellTableClean.css	 
Thu Aug  5 15:31:06 2010

@@ -64,6 +64,14 @@
   height: auto;
   overflow: auto;
 }
+
+.keyboardSelectedRow {
+
+}
+
+.keyboardSelectedCell {
+
+}

 @sprite .loading {
   gwt-image: 'cellTableLoading';

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r8494 committed - We write to JDK 1.5, so you can't put @Override when you implement...

2010-08-05 Thread codesite-noreply

Revision: 8494
Author: gwt.mirror...@gmail.com
Date: Thu Aug  5 16:22:31 2010
Log: We write to JDK 1.5, so you can't put @Override when you implement
something for an interface.

http://code.google.com/p/google-web-toolkit/source/detail?r=8494

Modified:
  
/trunk/user/src/com/google/gwt/validation/client/constraints/AbstractDecimalMaxValidator.java
  
/trunk/user/src/com/google/gwt/validation/client/constraints/AbstractDecimalMinValidator.java
  
/trunk/user/src/com/google/gwt/validation/client/constraints/AbstractDigitsValidator.java
  
/trunk/user/src/com/google/gwt/validation/client/constraints/AbstractMaxValidator.java
  
/trunk/user/src/com/google/gwt/validation/client/constraints/AbstractMinValidator.java
  
/trunk/user/src/com/google/gwt/validation/client/constraints/DecimalMaxValidatorForNumber.java
  
/trunk/user/src/com/google/gwt/validation/client/constraints/DecimalMaxValidatorForString.java
  
/trunk/user/src/com/google/gwt/validation/client/constraints/DecimalMinValidatorForNumber.java
  
/trunk/user/src/com/google/gwt/validation/client/constraints/DecimalMinValidatorForString.java
  
/trunk/user/src/com/google/gwt/validation/client/constraints/DigitsValidatorForNumber.java
  
/trunk/user/src/com/google/gwt/validation/client/constraints/DigitsValidatorForString.java
  
/trunk/user/src/com/google/gwt/validation/client/constraints/MaxValidatorForNumber.java
  
/trunk/user/src/com/google/gwt/validation/client/constraints/MaxValidatorForString.java
  
/trunk/user/src/com/google/gwt/validation/client/constraints/MinValidatorForNumber.java
  
/trunk/user/src/com/google/gwt/validation/client/constraints/MinValidatorForString.java
  
/trunk/user/src/com/google/gwt/validation/client/constraints/SizeValidatorForArrayOfBoolean.java
  
/trunk/user/src/com/google/gwt/validation/client/constraints/SizeValidatorForArrayOfByte.java
  
/trunk/user/src/com/google/gwt/validation/client/constraints/SizeValidatorForArrayOfChar.java
  
/trunk/user/src/com/google/gwt/validation/client/constraints/SizeValidatorForArrayOfDouble.java
  
/trunk/user/src/com/google/gwt/validation/client/constraints/SizeValidatorForArrayOfFloat.java
  
/trunk/user/src/com/google/gwt/validation/client/constraints/SizeValidatorForArrayOfInt.java
  
/trunk/user/src/com/google/gwt/validation/client/constraints/SizeValidatorForArrayOfLong.java
  
/trunk/user/src/com/google/gwt/validation/client/constraints/SizeValidatorForArrayOfObject.java
  
/trunk/user/src/com/google/gwt/validation/client/constraints/SizeValidatorForArrayOfShort.java
  
/trunk/user/src/com/google/gwt/validation/client/constraints/SizeValidatorForCollection.java
  
/trunk/user/src/com/google/gwt/validation/client/constraints/SizeValidatorForMap.java
  
/trunk/user/src/com/google/gwt/validation/client/constraints/SizeValidatorForString.java


===
---  
/trunk/user/src/com/google/gwt/validation/client/constraints/AbstractDecimalMaxValidator.java	 
Thu Aug  5 13:48:12 2010
+++  
/trunk/user/src/com/google/gwt/validation/client/constraints/AbstractDecimalMaxValidator.java	 
Thu Aug  5 16:22:31 2010

@@ -35,7 +35,6 @@
 super();
   }

-  @Override
   public final void initialize(DecimalMax constraintAnnotation) {
 try {
   max = new BigDecimal(constraintAnnotation.value());
===
---  
/trunk/user/src/com/google/gwt/validation/client/constraints/AbstractDecimalMinValidator.java	 
Thu Aug  5 13:48:12 2010
+++  
/trunk/user/src/com/google/gwt/validation/client/constraints/AbstractDecimalMinValidator.java	 
Thu Aug  5 16:22:31 2010

@@ -31,7 +31,6 @@

   private BigDecimal min;

-  @Override
   public final void initialize(DecimalMin constraintAnnotation) {
 try {
   min = new BigDecimal(constraintAnnotation.value());
===
---  
/trunk/user/src/com/google/gwt/validation/client/constraints/AbstractDigitsValidator.java	 
Thu Aug  5 13:48:12 2010
+++  
/trunk/user/src/com/google/gwt/validation/client/constraints/AbstractDigitsValidator.java	 
Thu Aug  5 16:22:31 2010

@@ -32,7 +32,6 @@
   private int fraction;
   private int integer;

-  @Override
   public final void initialize(Digits constraintAnnotation) {
 if (!(constraintAnnotation.fraction() = 0)) {
   throw new IllegalArgumentException(
===
---  
/trunk/user/src/com/google/gwt/validation/client/constraints/AbstractMaxValidator.java	 
Thu Aug  5 13:48:12 2010
+++  
/trunk/user/src/com/google/gwt/validation/client/constraints/AbstractMaxValidator.java	 
Thu Aug  5 16:22:31 2010

@@ -30,7 +30,6 @@

   private long max;

-  @Override
   public final void initialize(Max constraintAnnotation) {
 max = constraintAnnotation.value();
   }
===
---  
/trunk/user/src/com/google/gwt/validation/client/constraints/AbstractMinValidator.java	 
Thu Aug  5 13:48:12 2010
+++