[gwt-contrib] Throw an IllegalErgumentException if the property name is invalid. (issue1287802)

2011-01-24 Thread nchalko

Reviewers: rchandia,

Description:
Throw an IllegalErgumentException if the property name is invalid.

[JSR 303 TCK Result] 66 of 257 (25.68%) Pass with 25 Failures and 3
Errors.


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

Affected files:
  M  
user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java
  M  
user/test/org/hibernate/jsr303/tck/tests/validation/ValidateValueGwtTest.java



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


[gwt-contrib] [google-web-toolkit] r9604 committed - Updated StackTraceDeobfuscator javadoc in follow up to r9162....

2011-01-24 Thread codesite-noreply

Revision: 9604
Author: fre...@google.com
Date: Mon Jan 24 18:37:39 2011
Log: Updated StackTraceDeobfuscator javadoc in follow up to r9162.

Fixes issues: 5923

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

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

Modified:
 /trunk/user/src/com/google/gwt/logging/server/StackTraceDeobfuscator.java

===
---  
/trunk/user/src/com/google/gwt/logging/server/StackTraceDeobfuscator.java	 
Mon Dec  6 09:48:07 2010
+++  
/trunk/user/src/com/google/gwt/logging/server/StackTraceDeobfuscator.java	 
Mon Jan 24 18:37:39 2011

@@ -30,16 +30,18 @@

 /**
  * Deobfuscates stack traces on the server side. This class requires that  
you

- * have turned on emulated stack traces and moved your symbolMap files to a
- * place accessible by your server. More concretely, you must compile with  
the
- * -extra command line option, copy the  
symbolMaps
- * directory to somewhere your server side code has access to it, and then  
set
- * the symbolMapsDirectory in this class through the constructor, or the  
setter

- * method. For example, this variable could be set to
- * "WEB-INF/classes/symbolMaps/", if you copied the symbolMaps directory to
- * there or compiled your application using
- * -extra war/WEB-INF/classes/.
- *
+ * have turned on emulated stack traces, via
+ * 
+ * in your .gwt.xml module file, and moved your symbol map  
files to
+ * a location accessible by your server sever side code. You can use the  
GWT
+ * compiler -deploy command line argument to specify the  
location
+ * of the folder into which the generated symbolMaps  
directory is

+ * written. By default, the final symbolMaps directory is
+ * war/WEB-INF/deploy/yourmodulename/symbolMaps/. Pass  
the

+ * resulting directory location into this class'
+ * {@link StackTraceDeobfuscator#symbolMapsDirectory} constructor or
+ * {@link #setSymbolMapsDirectory(String)} setter method.
+ *
  * TODO(unnurg): Combine this code with similar code in JUnitHostImpl
  */
 public class StackTraceDeobfuscator {
@@ -58,9 +60,9 @@

   /**
* Constructor, which takes a symbolMaps directory as its
-   * argument. Symbol maps can be generated using the -extra  
GWT

-   * compiler argument.
-   *
+   * argument. Symbol maps are generated into the location specified by the
+   * GWT compiler -deploy command line argument.
+   *
* @param symbolMapsDirectory the symbolMaps directory  
with, or

*  without trailing directory separator character
*/
@@ -159,8 +161,8 @@
* Retrieves a new {@link InputStream} for the given permutation strong  
name.

* This implementation, which subclasses may override, returns a
* {@link InputStream} for the 
-   * .symbolMap file in the
-   * symbolMapsDirectory.
+   * permutation-strong-name.symbolMap file in the
+   * symbolMaps directory.
*
* @param permutationStrongName the GWT permutation strong name
* @return a new {@link InputStream}

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


[gwt-contrib] [google-web-toolkit] r9603 committed - Public (t.bro...@gmail.com):...

2011-01-24 Thread codesite-noreply

Revision: 9603
Author: rj...@google.com
Date: Mon Jan 24 15:45:54 2011
Log: Public (t.bro...@gmail.com):

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

For GIN friendliness, make the PlaceHistoryMapperGenerator return null
when it encounters a concrete implementation. (Returning null from
a code generator results in a new Foo() call.)

http://gwt-code-reviews.appspot.com/1293801

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

Modified:
  
/trunk/user/src/com/google/gwt/place/rebind/PlaceHistoryGeneratorContext.java
  
/trunk/user/src/com/google/gwt/place/rebind/PlaceHistoryMapperGenerator.java

 /trunk/user/src/com/google/gwt/place/shared/PlaceHistoryMapper.java
  
/trunk/user/test/com/google/gwt/place/impl/PlaceHistoryMapperGeneratorTest.java
  
/trunk/user/test/com/google/gwt/place/rebind/PlaceHistoryGeneratorContextTest.java


===
---  
/trunk/user/src/com/google/gwt/place/rebind/PlaceHistoryGeneratorContext.java	 
Tue Oct  5 17:59:14 2010
+++  
/trunk/user/src/com/google/gwt/place/rebind/PlaceHistoryGeneratorContext.java	 
Mon Jan 24 15:45:54 2011

@@ -38,6 +38,17 @@
 import java.util.TreeMap;

 class PlaceHistoryGeneratorContext {
+  /**
+   * Creates a {@link PlaceHistoryGeneratorContext} for the given
+   * {@link PlaceHistoryMapper} sub-interface.
+   *
+   * @return a {@link PlaceHistoryGeneratorContext}, or null  
if the
+   * generator should not run (i.e. interfaceName is  
not an

+   * interface)
+   * @throws UnableToCompleteException if the type denoted by
+   *   interfaceName cannot be found in
+   *   typeOracle
+   */
   static PlaceHistoryGeneratorContext create(TreeLogger logger,
   TypeOracle typeOracle, String interfaceName)
   throws UnableToCompleteException {
@@ -57,9 +68,7 @@
 }

 if (interfaceType.isInterface() == null) {
-  logger.log(TreeLogger.ERROR, interfaceType.getQualifiedSourceName()
-  + " is not an interface.", null);
-  throw new UnableToCompleteException();
+  return null;
 }

 factoryType = findFactoryType(placeHistoryMapperWithFactoryType,
===
---  
/trunk/user/src/com/google/gwt/place/rebind/PlaceHistoryMapperGenerator.java	 
Tue Oct  5 17:59:14 2010
+++  
/trunk/user/src/com/google/gwt/place/rebind/PlaceHistoryMapperGenerator.java	 
Mon Jan 24 15:45:54 2011

@@ -32,11 +32,6 @@
 import java.io.PrintWriter;

 /**
- * 
- * Experimental API: This class is still under  
rapid

- * development, and is very likely to be deleted. Use it at your own risk.
- * 
- * 
  * Generates implementations of
  * {@link com.google.gwt.place.shared.PlaceHistoryMapper  
PlaceHistoryMapper}.

  */
@@ -50,6 +45,10 @@
 context = PlaceHistoryGeneratorContext.create(logger,
 generatorContext.getTypeOracle(), interfaceName);

+if (context == null) {
+  return null;
+}
+
 PrintWriter out = generatorContext.tryCreate(logger,  
context.packageName,

 context.implName);

===
--- /trunk/user/src/com/google/gwt/place/shared/PlaceHistoryMapper.java	Thu  
Oct 14 18:28:29 2010
+++ /trunk/user/src/com/google/gwt/place/shared/PlaceHistoryMapper.java	Mon  
Jan 24 15:45:54 2011

@@ -18,6 +18,10 @@
 /**
  * Maps {@link Place}s to/from tokens, used to configure a
  * {@link PlaceHistoryHandler}.
+ * 
+ * You can annotate subinterfaces of PlaceHistoryMapper with
+ * {@link WithTokenizers} to have their implementation automatically  
generated

+ * via a call to {@link com.google.gwt.core.client.GWT#create(Class)}.
  */
 public interface PlaceHistoryMapper {

===
---  
/trunk/user/test/com/google/gwt/place/impl/PlaceHistoryMapperGeneratorTest.java	 
Tue Oct  5 18:38:29 2010
+++  
/trunk/user/test/com/google/gwt/place/impl/PlaceHistoryMapperGeneratorTest.java	 
Mon Jan 24 15:45:54 2011

@@ -47,6 +47,19 @@
   interface LocalWithFactory extends
   PlaceHistoryMapperWithFactory {
   };
+
+  /**
+   * The goal is only to test that the generator doesn't fail (but doesn't
+   * generate anything either).
+   */
+  static class LocalConcreteClass implements LocalNoFactory {
+public Place getPlace(String token) {
+  return null;
+}
+public String getToken(Place place) {
+  return null;
+}
+  }

   @Override
   public String getModuleName() {
@@ -86,6 +99,18 @@

 doTest(subject, factory);
   }
+
+  /**
+   * When asked to GWT.create a concrete implementation of  
PlaceHistoryMapper,

+   * the generator politely instantiates it. This is to make life easier
+   * for GIN users. See
+   * http://code.google.com/p/google-web-toolkit/issues/detail?id=5563
+   */
+  public void testNotAnInterface() {
+PlaceHistoryMapper subject = GWT.create(LocalConcreteClass.class);
+assertNull(subject.getToken(null));
+assertNull(subject.getPlace(null));
+  

[gwt-contrib] Re: Update MissingPlugin.html for FF4 support (issue1322802)

2011-01-24 Thread fabiomfv

lgtm

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

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


[gwt-contrib] Re: Generator Result Caching implementation for ClientBundle (issue1236801)

2011-01-24 Thread jbrosenberg

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

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


[gwt-contrib] Re: Generator Result Caching implementation for ClientBundle (issue1236801)

2011-01-24 Thread tobyr


http://gwt-code-reviews.appspot.com/1236801/diff/39001/40001
File dev/core/src/com/google/gwt/core/ext/typeinfo/JRealClassType.java
(right):

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40001#newcode28
dev/core/src/com/google/gwt/core/ext/typeinfo/JRealClassType.java:28:
void addByteCode(byte[] byteCode);
Sorted confusion out offline. In a nutshell, we should remove
addByteCode (not getTypeStrongHash).

On 2011/01/25 00:48:19, jbrosenberg wrote:

On 2011/01/24 19:14:07, tobyr wrote:
> Why is this method in the public interface? Can we just remove it

and leave

the
> implementation in typemodel.JRealClassType?



Well, I thought about doing that, but then we'd lose the benefits of

the

interface layer.  The generator calling getTypeStrongHash shouldn't

need to know

the specific implementation for JRealClassType (and of type oracle).

The

generators refer to the interface versions of all the type oracle and

class type

apis, and so this was in keeping with that.



Once we get the changes into TypeOracleMediator to be able to more

specifically

check type structure/version, we can add a capability interface (as

Bob

suggests), e.g. HasTypeStructureSignature.


http://gwt-code-reviews.appspot.com/1236801/diff/39001/40014
File
user/src/com/google/gwt/resources/rebind/context/AbstractClientBundleGenerator.java
(right):

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40014#newcode532
user/src/com/google/gwt/resources/rebind/context/AbstractClientBundleGenerator.java:532:
// use the jar file itself for the modified date test
On 2011/01/25 00:48:19, jbrosenberg wrote:

On 2011/01/24 19:14:07, tobyr wrote:
> Document why



Done.


Sorry, I meant document why we'd want to use the jar file timestamp
instead of the entry timestamp.

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40014#newcode538
user/src/com/google/gwt/resources/rebind/context/AbstractClientBundleGenerator.java:538:
File file = new File(url.getPath());
Can we get rid of this special-casing and just use url.getLastModified?

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

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


[gwt-contrib] Re: Generator Result Caching implementation for ClientBundle (issue1236801)

2011-01-24 Thread jbrosenberg


http://gwt-code-reviews.appspot.com/1236801/diff/39001/40001
File dev/core/src/com/google/gwt/core/ext/typeinfo/JRealClassType.java
(right):

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40001#newcode28
dev/core/src/com/google/gwt/core/ext/typeinfo/JRealClassType.java:28:
void addByteCode(byte[] byteCode);
On 2011/01/25 00:48:19, jbrosenberg wrote:

On 2011/01/24 19:14:07, tobyr wrote:
> Why is this method in the public interface? Can we just remove it

and leave

the
> implementation in typemodel.JRealClassType?



Well, I thought about doing that, but then we'd lose the benefits of

the

interface layer.  The generator calling getTypeStrongHash shouldn't

need to know

the specific implementation for JRealClassType (and of type oracle).

The

generators refer to the interface versions of all the type oracle and

class type

apis, and so this was in keeping with that.



Once we get the changes into TypeOracleMediator to be able to more

specifically

check type structure/version, we can add a capability interface (as

Bob

suggests), e.g. HasTypeStructureSignature.


Ok, I see the light nowdone

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

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


[gwt-contrib] Re: Generator Result Caching implementation for ClientBundle (issue1236801)

2011-01-24 Thread jbrosenberg

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

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


[gwt-contrib] Re: Update MissingPlugin.html for FF4 support (issue1322802)

2011-01-24 Thread jat

LGTM


http://gwt-code-reviews.appspot.com/1322802/diff/1/2
File plugins/MissingPlugin/war/MissingPlugin.html (right):

http://gwt-code-reviews.appspot.com/1322802/diff/1/2#newcode84
plugins/MissingPlugin/war/MissingPlugin.html:84: "platforms" : "Win x86,
Linux x86/x86_64, Mac x86/PPC(3.x only)/x86_64 (4.x) only",
On 2011/01/25 01:09:17, conroy wrote:

this is probably too much detail. Could just change it to

x86/ppc/x86_64 and let

the rest be read between the lines. what do you guys think?


I don't think it hurts anything.

BTW, we should probably add some text for the FF page telling users to
dismiss the "plugin not found" infobar and then click on allow.

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

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


[gwt-contrib] Re: AbstractPlaceHistoryMapper doesn't process tokens correctly wrt empty prefixes (issue1316801)

2011-01-24 Thread rjrjr

LGTM, submitting

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

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


[gwt-contrib] Re: Update MissingPlugin.html for FF4 support (issue1322802)

2011-01-24 Thread conroy


http://gwt-code-reviews.appspot.com/1322802/diff/1/2
File plugins/MissingPlugin/war/MissingPlugin.html (right):

http://gwt-code-reviews.appspot.com/1322802/diff/1/2#newcode84
plugins/MissingPlugin/war/MissingPlugin.html:84: "platforms" : "Win x86,
Linux x86/x86_64, Mac x86/PPC(3.x only)/x86_64 (4.x) only",
this is probably too much detail. Could just change it to x86/ppc/x86_64
and let the rest be read between the lines. what do you guys think?

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

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


[gwt-contrib] Update MissingPlugin.html for FF4 support (issue1322802)

2011-01-24 Thread conroy

Reviewers: jat, fabiomfv,

Description:
Update MissingPlugin.html for FF4 support


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

Affected files:
  M plugins/MissingPlugin/war/MissingPlugin.html


Index: plugins/MissingPlugin/war/MissingPlugin.html
===
--- plugins/MissingPlugin/war/MissingPlugin.html(revision 9602)
+++ plugins/MissingPlugin/war/MissingPlugin.html(working copy)
@@ -35,7 +35,7 @@

   "firefox-old" :
   {
-"caption" : "Sorry, the GWT Developer Plugin only supports  
Firefox 3.0 and 3.5 at present",
+"caption" : "Sorry, the GWT Developer Plugin only supports  
Firefox 3.0 - 4.0 at present",

 "url" : "http://www.getfirefox.com";,
 "supported" : false
   },
@@ -81,7 +81,7 @@
   {
 "caption" : "Download the GWT Developer PluginFor Firefox",
 "url" : 
"https://dl-ssl.google.com/gwt/plugins/firefox/gwt-dev-plugin.xpi";,
-"platforms" : "Win x86, Linux x86/x86_64, Mac x86/PPC",
+"platforms" : "Win x86, Linux x86/x86_64, Mac x86/PPC(3.x  
only)/x86_64 (4.x) only",

 "supported" : true
   },

@@ -130,7 +130,8 @@
   } else if (ua.indexOf("opera") != -1) {
 id = 'opera';
   } else if (ua.indexOf("gecko") != -1) {
-if (ua.indexOf("rv:1.9") != -1) {
+  if (ua.indexOf("rv:1.9") != -1 ||
+  ua.indexOf("rv:2.0") != -1) {
   id = 'firefox';
 } else {
   id = 'firefox-old';


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


[gwt-contrib] Re: Generator Result Caching implementation for ClientBundle (issue1236801)

2011-01-24 Thread jbrosenberg

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

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


[gwt-contrib] Re: Generator Result Caching implementation for ClientBundle (issue1236801)

2011-01-24 Thread jbrosenberg


http://gwt-code-reviews.appspot.com/1236801/diff/39001/40001
File dev/core/src/com/google/gwt/core/ext/typeinfo/JRealClassType.java
(right):

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40001#newcode28
dev/core/src/com/google/gwt/core/ext/typeinfo/JRealClassType.java:28:
void addByteCode(byte[] byteCode);
On 2011/01/24 19:14:07, tobyr wrote:

Why is this method in the public interface? Can we just remove it and

leave the

implementation in typemodel.JRealClassType?


Well, I thought about doing that, but then we'd lose the benefits of the
interface layer.  The generator calling getTypeStrongHash shouldn't need
to know the specific implementation for JRealClassType (and of type
oracle).  The generators refer to the interface versions of all the type
oracle and class type apis, and so this was in keeping with that.

Once we get the changes into TypeOracleMediator to be able to more
specifically check type structure/version, we can add a capability
interface (as Bob suggests), e.g. HasTypeStructureSignature.

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40003
File
dev/core/src/com/google/gwt/dev/javac/rebind/CachedClientDataMap.java
(right):

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40003#newcode39
dev/core/src/com/google/gwt/dev/javac/rebind/CachedClientDataMap.java:39:
// this will throw a ClassCastException if value is not Serializable
On 2011/01/24 19:14:07, tobyr wrote:

Comment is pointless as is. Document with javadoc instead?


Agreed, I've removed the comment

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40008
File dev/core/src/com/google/gwt/dev/javac/typemodel/JRealClassType.java
(right):

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40008#newcode290
dev/core/src/com/google/gwt/dev/javac/typemodel/JRealClassType.java:290:
lazyTypeStrongHash = Util.computeStrongName(byteCode);
On 2011/01/24 19:14:07, tobyr wrote:

This isn't exactly what we want either, but it's better than assuming

always

stale or taking a long time to compute a hash. Can you add a comment

here that

explains that ideally we want to identify staleness based on a type's

structure,

not including its code, but we don't have a quick way to compute a

hash for type

structure yet?


I've added a TODO to revisit implementing an efficient hash of the type
structure.

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40010
File user/src/com/google/gwt/resources/ext/ClientBundleRequirements.java
(right):

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40010#newcode50
user/src/com/google/gwt/resources/ext/ClientBundleRequirements.java:50:
* whether a configuration property by the same name exists.
On 2011/01/24 19:33:31, bobv wrote:

This sounds sloppy.


Well, this was current behavior (I didn't add).  Should it be removed?
I added the comment in the javadoc, to make it clear, as I noticed the
discrepancy in the description.

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40011
File user/src/com/google/gwt/resources/ext/ResourceContext.java (right):

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40011#newcode143
user/src/com/google/gwt/resources/ext/ResourceContext.java:143:
ClientBundleRequirements getRequirements();
On 2011/01/24 19:33:31, bobv wrote:

In order to compute the simple name of the implementing ClientBundle

type, it is

necessary to know all of the permutation properties that affect the

generated

code.  If the requirements object can be accessed at arbitrary point

in time, it

would be possible to add a property requirement after the
GeneratorContext.tryCreate() call has been made.


Yeah, I suppose so.  Essentially now the Requirements class has 2 uses
(whereas before it only had one, the simple file name).  Now I'm also
using it for tracking selection/configuration properties and type
dependencies, for the purpose of checking cacheability.

FWIW, I don't see anywhere there where I've added calls to
"addPermutationAxis()" after the tryCreate call (but there are now
subsequent calls to requirements.AddConfigurationProperty() and
requirements.AddTypeHierarchy()). I think there was the danger anyway
prior to this change, that the Requirements object could have been
updated after the call to get the simple name.  I agree it's now easier
for someone to do so since it's part of the context.  But there is still
no guard against a code path that might take an alternate code path
based on a selection property after the simple name has been assigned.

I suppose we can add a call to disable any further updates to any new
permutationAxis entries.  E.g.
Requirements.disableFurtherPermutationAxisUpdates() (need a better
name!). And then throw an exception if anyone tries to add a
permutationAxis afterwards.  Although that may be restrictive, in that
it prevents selection properties being subsequently added to the set of
dependencies.

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40011#newcode153
user/src/com/google/gwt/resources/ext/

[gwt-contrib] Re: Allow Editor framework to handle primitive types. (issue1312802)

2011-01-24 Thread rjrjr

LGTM


http://gwt-code-reviews.appspot.com/1312802/diff/1/2
File user/src/com/google/gwt/editor/rebind/model/EditorModel.java
(right):

http://gwt-code-reviews.appspot.com/1312802/diff/1/2#newcode503
user/src/com/google/gwt/editor/rebind/model/EditorModel.java:503: if
(!lastPart && lookingAt == null) {
You have a test for this bit?

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

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


[gwt-contrib] [google-web-toolkit] r9602 committed - Improve canvas for browsers (and permutations) with partial canvas sup...

2011-01-24 Thread codesite-noreply

Revision: 9602
Author: p...@google.com
Date: Mon Jan 24 12:09:10 2011
Log: Improve canvas for browsers (and permutations) with partial canvas  
support.


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

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

Added:
 /trunk/user/src/com/google/gwt/dom/client/PartialSupport.java
Deleted:
 /trunk/user/src/com/google/gwt/user/client/IsSupported.java
Modified:
 /trunk/user/src/com/google/gwt/canvas/Canvas.gwt.xml
 /trunk/user/src/com/google/gwt/canvas/client/Canvas.java
 /trunk/user/test/com/google/gwt/canvas/client/CanvasTest.java
 /trunk/user/test/com/google/gwt/canvas/dom/client/Context2dTest.java

===
--- /dev/null
+++ /trunk/user/src/com/google/gwt/dom/client/PartialSupport.java	Mon Jan  
24 12:09:10 2011

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

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

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

+ * the License.
+ */
+package com.google.gwt.dom.client;
+
+/**
+ * Annotation for classes that are only supported on a limited set of  
browsers.

+ *
+ * 
+ * By convention, classes annotated with PartialSupport will provide two  
static

+ * methods:
+ * 
+ *static boolean isSupported() that returns whether  
the

+ *   feature is supported. 
+ *static YourType createIfSupported() factory method  
that

+ *   returns a new feature if supported, or null otherwise. 
+ * 
+ * 
+ */
+public @interface PartialSupport {
+
+}
===
--- /trunk/user/src/com/google/gwt/user/client/IsSupported.java	Thu Jan 13  
05:38:38 2011

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

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

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

- * the License.
- */
-
-package com.google.gwt.user.client;
-
-/**
- * Interface for classes that are only supported on a limited set of  
browsers.

- *
- * 
- * Experimental API: This API is still under  
development

- * and is subject to change.
- * 
- * 
- *
- * By convention, classes that implement IsSupported will provide a static
- * method boolean isSupported() that checks whether the  
feature is

- * supported at runtime.
- */
-public interface IsSupported {
-
-}
===
--- /trunk/user/src/com/google/gwt/canvas/Canvas.gwt.xml	Tue Nov 30  
06:11:17 2010
+++ /trunk/user/src/com/google/gwt/canvas/Canvas.gwt.xml	Mon Jan 24  
12:09:10 2011

@@ -16,5 +16,30 @@
 
   
   
+
+  
+  
+
+  
+  
+
+  
+
+  
+  
+  
+
+  
+
+  class="com.google.gwt.canvas.client.Canvas.CanvasElementSupportDetectedMaybe">
+class="com.google.gwt.canvas.client.Canvas.CanvasElementSupportDetector" />

+
+  
+
+  class="com.google.gwt.canvas.client.Canvas.CanvasElementSupportDetectedNo">
+class="com.google.gwt.canvas.client.Canvas.CanvasElementSupportDetector" />

+
+  
+
   
 
===
--- /trunk/user/src/com/google/gwt/canvas/client/Canvas.java	Thu Jan 13  
05:38:38 2011
+++ /trunk/user/src/com/google/gwt/canvas/client/Canvas.java	Mon Jan 24  
12:09:10 2011

@@ -17,9 +17,10 @@

 import com.google.gwt.canvas.dom.client.Context;
 import com.google.gwt.canvas.dom.client.Context2d;
+import com.google.gwt.core.client.GWT;
 import com.google.gwt.dom.client.CanvasElement;
 import com.google.gwt.dom.client.Document;
-import com.google.gwt.user.client.IsSupported;
+import com.google.gwt.dom.client.PartialSupport;
 import com.google.gwt.user.client.ui.FocusWidget;

 /**
@@ -31,25 +32,55 @@
  * 
  * 
  *
- * This widget may not be supported on all browsers, see {@link  
IsSupported}

+ * This widget may not be supported on all browsers.
  */
-public class Canvas extends FocusWidget implements IsSupported {
+@PartialSupport
+public class Canvas extends FocusWidget {
+  private static CanvasElementSupportDetector detector;
+
+  /**
+   * Return a new {@link Canvas} if supported,  and null otherwise.
+   *
+   * @return a new {@link Canvas} if supported, and null othe

[gwt-contrib] Re: Add option to use JSONP in ExternalTextResource (issue1310801)

2011-01-24 Thread unnurg

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

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


[gwt-contrib] [google-web-toolkit] r9601 committed - Include class level constraints in the BeanDescriptor....

2011-01-24 Thread codesite-noreply

Revision: 9601
Author: ncha...@google.com
Date: Mon Jan 24 10:40:07 2011
Log: Include class level constraints in the BeanDescriptor.
All BeanDescriptor TCK tests now pass.

[JSR 303 TCK Result] 65 of 257 (25.29%) Pass with 25 Failures and 4 Errors.

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

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

Modified:
  
/trunk/user/src/com/google/gwt/validation/client/impl/GwtBeanDescriptorImpl.java
  
/trunk/user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java
  
/trunk/user/test/org/hibernate/jsr303/tck/tests/metadata/BeanDescriptorGwtTest.java


===
---  
/trunk/user/src/com/google/gwt/validation/client/impl/GwtBeanDescriptorImpl.java	 
Tue Dec 14 08:48:08 2010
+++  
/trunk/user/src/com/google/gwt/validation/client/impl/GwtBeanDescriptorImpl.java	 
Mon Jan 24 10:40:07 2011

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

+import java.lang.annotation.Annotation;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
@@ -34,21 +35,31 @@

   /**
* Builder for {@link GwtBeanDescriptors}.
-   *
+   *
* @param  the bean Type
*/
   public static final class Builder {

 private final Class clazz;
-private final Map descriptorMap = new  
HashMap();

+private final Map descriptorMap =
+new HashMap();
+private final Set>  
constraints =

+new HashSet>();
 private boolean isConstrained;

 private Builder(Class clazz) {
   this.clazz = clazz;
 }
+
+public Builder add(
+ConstraintDescriptor constraintDescriptor) {
+  constraints.add(constraintDescriptor);
+  return this;
+}

 public GwtBeanDescriptorImpl build() {
-  return new GwtBeanDescriptorImpl(clazz, isConstrained,  
descriptorMap);
+  return new GwtBeanDescriptorImpl(clazz, isConstrained,  
descriptorMap,

+  constraints);
 }

 public Builder put(String key, PropertyDescriptor value) {
@@ -73,11 +84,13 @@
   private final boolean isBeanConstrained;

   private GwtBeanDescriptorImpl(Class clazz, boolean isConstrained,
-  Map descriptorMap) {
+  Map descriptorMap,
+  Set> constraints) {
 super();
 this.clazz = clazz;
 this.isBeanConstrained = isConstrained;
 this.descriptorMap.putAll(descriptorMap);
+this.constraints.addAll(constraints);
   }

   public ConstraintFinder findConstraints() {
@@ -109,15 +122,4 @@
   public boolean isBeanConstrained() {
 return isBeanConstrained;
   }
-
-  protected void setDescriptorMap(Map map) {
-descriptorMap.clear();
-descriptorMap.putAll(map);
-constraints.clear();
-for (PropertyDescriptor p : descriptorMap.values()) {
-  if (p.hasConstraints()) {
-constraints.addAll(p.getConstraintDescriptors());
-  }
-}
-  }
-}
+}
===
---  
/trunk/user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java	 
Wed Jan 19 06:58:02 2011
+++  
/trunk/user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java	 
Mon Jan 24 10:40:07 2011

@@ -491,6 +491,12 @@

 // .setConstrained(true)
 sw.println(".setConstrained(" + beanDescriptor.isBeanConstrained()  
+ ")");

+
+int count = 0;
+for (ConstraintDescriptorconstraint :  
beanDescriptor.getConstraintDescriptors()) {

+  // .add(c0)
+  sw.println(".add(" + constraintDescriptorVar("this", count++) + ")");
+}

 // .put("myProperty", myProperty_pd)
 for (PropertyDescriptor p : beanDescriptor.getConstrainedProperties())  
{

@@ -612,8 +618,7 @@
   int count = 0;
   for (ConstraintDescriptor constraint :  
p.getConstraintDescriptors()) {

 writeConstraintDescriptor(sw, constraint,
-constraintDescriptorVar(p.getPropertyName(), count));
-count++; // index starts at zero.
+constraintDescriptorVar(p.getPropertyName(), count++));
   }
   writePropertyDescriptor(sw, p);
   if (p.isCascaded()) {
@@ -622,20 +627,19 @@
 : createBeanHelper(p.getElementClass()));
   }
 }
-
-// Now write the BeanDescriptor after we already have the  
PropertyDescriptor

-writeBeanDescriptor(sw);
-sw.println();

 // Create a variable for each constraint of this class.
 int count = 0;
 for (ConstraintDescriptor constraint :
 beanHelper.getBeanDescriptor().getConstraintDescriptors()) {
-
   writeConstraintDescriptor(sw, constraint,
-  constraintDescriptorVar("this", count));
-  count++; // index starts at zero.
-}
+  constraintDescriptorVar("this", count++));
+}
+
+// Now write the BeanDescriptor after we already have the
+// PropertyDescriptors and class constraints
+writeBeanDescriptor(sw);
+sw.println();
   }

   private void writeFieldWrapperMethod(SourceWriter sw, JField field) {
@@ -882,7 +886,7 @@

[gwt-contrib] Re: Include class level constraints in the BeanDescriptor. (issue1319801)

2011-01-24 Thread nchalko



Why is this comment important?


It used to start at one.  I will remove it now that it is no longer
significant.


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

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


[gwt-contrib] Re: Include class level constraints in the BeanDescriptor. (issue1319801)

2011-01-24 Thread rchandia

LGTM. Wit nits.


http://gwt-code-reviews.appspot.com/1319801/diff/1/3
File
user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java
(right):

http://gwt-code-reviews.appspot.com/1319801/diff/1/3#newcode499
user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java:499:
count++; // index starts at zero.
Why is this comment important?

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

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


[gwt-contrib] [google-web-toolkit] r9600 committed - Cherry picking r9595 into 2.2 release branch.

2011-01-24 Thread codesite-noreply

Revision: 9600
Author: gwt.mirror...@gmail.com
Date: Mon Jan 24 13:01:56 2011
Log: Cherry picking r9595 into 2.2 release branch.

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

Modified:
  
/releases/2.2/samples/showcase/src/com/google/gwt/sample/showcase/Showcase.gwt.xml


===
---  
/releases/2.2/samples/showcase/src/com/google/gwt/sample/showcase/Showcase.gwt.xml	 
Wed Jan  5 12:33:32 2011
+++  
/releases/2.2/samples/showcase/src/com/google/gwt/sample/showcase/Showcase.gwt.xml	 
Mon Jan 24 13:01:56 2011

@@ -20,11 +20,9 @@

   
   
-  
   
   value="SHOWCASE_LOCALE"/>

 

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


[gwt-contrib] Re: Updated StackTraceDeobfuscator javadoc in follow up to r9162. (issue1321801)

2011-01-24 Thread unnurg

LGTM

On 2011/01/24 19:53:04, fredsa wrote:




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

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


[gwt-contrib] [google-web-toolkit] r9599 committed - Support for IE9 GWT Developer Mode plugin.

2011-01-24 Thread codesite-noreply

Revision: 9599
Author: fabio...@google.com
Date: Mon Jan 24 08:49:19 2011
Log: Support for IE9 GWT Developer Mode plugin.

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

Added:
 /trunk/plugins/ie/oophm/oophm/Constants.h
 /trunk/plugins/ie/oophm/oophm/IEUtils.h
 /trunk/plugins/platform
 /trunk/plugins/platform/Win
 /trunk/plugins/platform/Win/AllowDialog.cpp
 /trunk/plugins/platform/Win/AllowDialog.h
 /trunk/plugins/platform/Win/Preferences.cpp
 /trunk/plugins/platform/Win/Preferences.h
Modified:
 /trunk/plugins/common/Socket.cpp
 /trunk/plugins/ie/installer/oophm.wxs
 /trunk/plugins/ie/oophm/oophm/IESessionHandler.cpp
 /trunk/plugins/ie/oophm/oophm/JavaObject.cpp
 /trunk/plugins/ie/oophm/oophm/SessionData.h
 /trunk/plugins/ie/oophm/oophm/oophm.rc
 /trunk/plugins/ie/oophm/oophm/oophm.vcproj
 /trunk/plugins/ie/oophm/oophm/plugin.cpp
 /trunk/plugins/ie/oophm/oophm/plugin.h
 /trunk/plugins/ie/oophm/oophm/stdafx.h
 /trunk/plugins/ie/prebuilt/Win32/oophm.dll
 /trunk/plugins/ie/prebuilt/gwt-dev-plugin-x64.msi
 /trunk/plugins/ie/prebuilt/gwt-dev-plugin-x86.msi
 /trunk/plugins/ie/prebuilt/x64/oophm.dll

===
--- /dev/null
+++ /trunk/plugins/ie/oophm/oophm/Constants.h   Mon Jan 24 08:49:19 2011
@@ -0,0 +1,22 @@
+#pragma once
+
+#include "stdafx.h"
+
+class Constants
+{
+public:
+const static LPOLESTR __gwt_disconnected;
+const static LPOLESTR valueOf;
+const static LPOLESTR Error;
+const static _bstr_t JavaScript;
+const static LPOLESTR __gwt_makeResult;
+const static LPOLESTR __gwt_makeTearOff;
+};
+
+__declspec(selectany) const LPOLESTR Constants::__gwt_disconnected =  
L"__gwt_disconnected";

+__declspec(selectany) const LPOLESTR Constants::valueOf = L"valueOf";
+__declspec(selectany) const LPOLESTR Constants::Error = L"Error";
+__declspec(selectany) const _bstr_t Constants::JavaScript =  
_bstr_t(L"JavaScript");
+__declspec(selectany) const LPOLESTR Constants::__gwt_makeResult =  
L"__gwt_makeResult";
+__declspec(selectany) const LPOLESTR Constants::__gwt_makeTearOff =  
L"__gwt_makeTearOff";

+
===
--- /dev/null
+++ /trunk/plugins/ie/oophm/oophm/IEUtils.h Mon Jan 24 08:49:19 2011
@@ -0,0 +1,178 @@
+/*
+* 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.
+*/
+
+#pragma once
+#include "stdafx.h"
+#include "comutil.h"
+#include "dispex.h"
+#include "SessionData.h"
+
+#define SYSLOGERROR(MSG,FMT,...) \
+LPCWSTR msgArr[3] = {NULL, NULL, NULL}; \
+msgArr[0] = MSG; \
+WCHAR buffer1[512]; \
+swprintf(buffer1, sizeof(buffer1)/sizeof(WCHAR), FMT, __VA_ARGS__); \
+msgArr[1] = buffer1; \
+WCHAR buffer2[512]; \
+swprintf(buffer2, sizeof(buffer2)/sizeof(WCHAR), L"function: %S,  
file: %S, line: %d", __FUNCTION__, __FILE__, __LINE__); \

+msgArr[2] = buffer2; \
+IEUtils::WriteToLog((LPCWSTR*)msgArr, 3);
+
+
+typedef HRESULT (*PFNRESOLVENAME)(IDispatch*, LPOLESTR, DISPID*);
+
+//
+// This class is a collection of helper methods specific to IE
+// It finds the appropriate implementation that resolves javascript
+// names regardless of the specific documentMode that browser is
+// running.
+//
+class IEUtils
+{
+static HANDLE hEventLog;
+static LPWSTR logSourceName;
+static PFNRESOLVENAME pfnResolveName;
+
+//
+// finds which IDispatch interface is capable of
+// of 'resolving' names.
+//
+static PFNRESOLVENAME getResolveNameFunction(IDispatch* obj)
+{
+_variant_t retVal;
+std::string probeScript("function  
_FN3E9738B048214100A6D6B750F2230A34() { return null; }");

+CComQIPtr spWindow2(obj);
+if (!spWindow2) {
+return &IEUtils::internalResolveNameEx;
+}
+LPOLESTR functionName = L"_FN3E9738B048214100A6D6B750F2230A34";
+HRESULT hr =  
spWindow2->execScript(UTF8ToBSTR(probeScript.length(), probeScript.c_str()),

+UTF8ToBSTR(10, "JavaScript"), retVal.GetAddress());
+if (SUCCEEDED(hr)) {
+DISPID dispId;
+hr = internalResolveName(spWindow2, functionName, &dispId);
+if (SUCCEEDED(hr)) {
+return &IEUtils::internalResolveName;
+} else {
+hr = internalResolveNameEx(spWindow2, functionName,  
&dispId);

+if (SUCCEEDED(hr)) {
+return &IEUtils::internalResolveNameEx;
+} else {
+SYSLOGERROR

[gwt-contrib] Updated StackTraceDeobfuscator javadoc in follow up to r9162. (issue1321801)

2011-01-24 Thread fredsa

Reviewers: unnurg,

Description:
Updated StackTraceDeobfuscator javadoc in follow up to r9162.

Fixes issues: 5923


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

Affected files:
  M user/src/com/google/gwt/logging/server/StackTraceDeobfuscator.java


Index: user/src/com/google/gwt/logging/server/StackTraceDeobfuscator.java
===
--- user/src/com/google/gwt/logging/server/StackTraceDeobfuscator.java	 
(revision 9493)
+++ user/src/com/google/gwt/logging/server/StackTraceDeobfuscator.java	 
(working copy)

@@ -30,16 +30,18 @@

 /**
  * Deobfuscates stack traces on the server side. This class requires that  
you

- * have turned on emulated stack traces and moved your symbolMap files to a
- * place accessible by your server. More concretely, you must compile with  
the
- * -extra command line option, copy the  
symbolMaps
- * directory to somewhere your server side code has access to it, and then  
set
- * the symbolMapsDirectory in this class through the constructor, or the  
setter

- * method. For example, this variable could be set to
- * "WEB-INF/classes/symbolMaps/", if you copied the symbolMaps directory to
- * there or compiled your application using
- * -extra war/WEB-INF/classes/.
- *
+ * have turned on emulated stack traces, via
+ * 
+ * in your .gwt.xml module file, and moved your symbol map  
files to
+ * a location accessible by your server sever side code. You can use the  
GWT
+ * compiler -deploy command line argument to specify the  
location
+ * of the folder into which the generated symbolMaps  
directory is

+ * written. By default, the final symbolMaps directory is
+ * war/WEB-INF/deploy/yourmodulename/symbolMaps/. Pass  
the

+ * resulting directory location into this class'
+ * {@link StackTraceDeobfuscator#symbolMapsDirectory} constructor or
+ * {@link #setSymbolMapsDirectory(String)} setter method.
+ *
  * TODO(unnurg): Combine this code with similar code in JUnitHostImpl
  */
 public class StackTraceDeobfuscator {
@@ -58,9 +60,9 @@

   /**
* Constructor, which takes a symbolMaps directory as its
-   * argument. Symbol maps can be generated using the -extra  
GWT

-   * compiler argument.
-   *
+   * argument. Symbol maps are generated into the location specified by the
+   * GWT compiler -deploy command line argument.
+   *
* @param symbolMapsDirectory the symbolMaps directory  
with, or

*  without trailing directory separator character
*/
@@ -159,8 +161,8 @@
* Retrieves a new {@link InputStream} for the given permutation strong  
name.

* This implementation, which subclasses may override, returns a
* {@link InputStream} for the 
-   * .symbolMap file in the
-   * symbolMapsDirectory.
+   * permutation-strong-name.symbolMap file in the
+   * symbolMaps directory.
*
* @param permutationStrongName the GWT permutation strong name
* @return a new {@link InputStream}


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


Re: [gwt-contrib] Re: Issue 5549: fix is/has support for boolean properties (issue1272801)

2011-01-24 Thread BobV
Argh.  I forgot about this and it wasn't on a 2.3 issue tracker.  I'll
merge the extra things that this fixes into the patch I sent out.

-- 
Bob Vawter
Google Web Toolkit Team

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


[gwt-contrib] Re: Generator Result Caching implementation for ClientBundle (issue1236801)

2011-01-24 Thread jbrosenberg


http://gwt-code-reviews.appspot.com/1236801/diff/39001/40003
File
dev/core/src/com/google/gwt/dev/javac/rebind/CachedClientDataMap.java
(right):

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40003#newcode2
dev/core/src/com/google/gwt/dev/javac/rebind/CachedClientDataMap.java:2:
* Copyright 2010 Google Inc.
On 2011/01/24 18:53:37, zundel wrote:

welcome to 2011


Done.

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40013
File
user/src/com/google/gwt/resources/ext/SupportsGeneratorResultCaching.java
(right):

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40013#newcode2
user/src/com/google/gwt/resources/ext/SupportsGeneratorResultCaching.java:2:
* Copyright 2010 Google Inc.
On 2011/01/24 18:53:37, zundel wrote:

2011


Done.

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

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


[gwt-contrib] Re: Generator Result Caching implementation for ClientBundle (issue1236801)

2011-01-24 Thread jbrosenberg

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

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


[gwt-contrib] Re: Add option to use JSONP in ExternalTextResource (issue1310801)

2011-01-24 Thread unnurg

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

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


[gwt-contrib] Re: Generator Result Caching implementation for ClientBundle (issue1236801)

2011-01-24 Thread bobv

The automatic resolution of @Source files is too magic and doesn't
address external resources.  The whole HasFindableResourceDependencies
looks unnecessary and doesn't jive with how the rest of the inputs to a
ResourceGenerator are tracked.


http://gwt-code-reviews.appspot.com/1236801/diff/39001/40010
File user/src/com/google/gwt/resources/ext/ClientBundleRequirements.java
(right):

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40010#newcode50
user/src/com/google/gwt/resources/ext/ClientBundleRequirements.java:50:
* whether a configuration property by the same name exists.
This sounds sloppy.

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40011
File user/src/com/google/gwt/resources/ext/ResourceContext.java (right):

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40011#newcode143
user/src/com/google/gwt/resources/ext/ResourceContext.java:143:
ClientBundleRequirements getRequirements();
In order to compute the simple name of the implementing ClientBundle
type, it is necessary to know all of the permutation properties that
affect the generated code.  If the requirements object can be accessed
at arbitrary point in time, it would be possible to add a property
requirement after the GeneratorContext.tryCreate() call has been made.

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40011#newcode153
user/src/com/google/gwt/resources/ext/ResourceContext.java:153: *
interface can expect to call this method successfully.
The implementation does not enforce this.

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40013
File
user/src/com/google/gwt/resources/ext/SupportsGeneratorResultCaching.java
(right):

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40013#newcode41
user/src/com/google/gwt/resources/ext/SupportsGeneratorResultCaching.java:41:
public interface HasFindableResourceDependencies extends
Why is this interface necessary when accumulation of source files could
just as easily be added to the Requirements interface?

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40014
File
user/src/com/google/gwt/resources/rebind/context/AbstractClientBundleGenerator.java
(right):

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40014#newcode233
user/src/com/google/gwt/resources/rebind/context/AbstractClientBundleGenerator.java:233:
addTypeHierarchy(superType);
This will cause redundant calls to addTypeHierarchy().

types.addAll(type.getFlattenedSupertypeHierarchy()) should be
sufficient.

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40014#newcode260
user/src/com/google/gwt/resources/rebind/context/AbstractClientBundleGenerator.java:260:

Extra whitespace, here and elsewhere.

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40014#newcode397
user/src/com/google/gwt/resources/rebind/context/AbstractClientBundleGenerator.java:397:
CachedPropertyInformation cpi = new CachedPropertyInformation(logger,
Use a builder pattern for this type, since the number of things that
affect dependencies is likely to increase in the future.

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40014#newcode484
user/src/com/google/gwt/resources/rebind/context/AbstractClientBundleGenerator.java:484:
JRealClassType sourceRealType = (JRealClassType) sourceType;
It would be more consistent with the rest of the API to cast to a
capability interface such as HasTypeSignature here, rather than using
JRealClassType.

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40014#newcode820
user/src/com/google/gwt/resources/rebind/context/AbstractClientBundleGenerator.java:820:
logger, resourceContext, method);
This is insufficient if the ResourceGenerator uses external resources
not defined via an @Source annotation.

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40020
File
user/src/com/google/gwt/resources/rg/ExternalTextResourceGenerator.java
(right):

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40020#newcode43
user/src/com/google/gwt/resources/rg/ExternalTextResourceGenerator.java:43:
public final class ExternalTextResourceGenerator extends
FYI: Unnur is also working on a change to ETRG that may affect its use
of properties.

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

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


[gwt-contrib] Re: Issue 5549: fix is/has support for boolean properties (issue1272801)

2011-01-24 Thread t . broyer

Superseeded by http://gwt-code-reviews.appspot.com/1320801/show (which
does not deal with the RequestFactory issues, but I suppose they'll come
next)

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

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


[gwt-contrib] Re: Generator Result Caching implementation for ClientBundle (issue1236801)

2011-01-24 Thread tobyr

Almost there


http://gwt-code-reviews.appspot.com/1236801/diff/39001/40001
File dev/core/src/com/google/gwt/core/ext/typeinfo/JRealClassType.java
(right):

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40001#newcode28
dev/core/src/com/google/gwt/core/ext/typeinfo/JRealClassType.java:28:
void addByteCode(byte[] byteCode);
Why is this method in the public interface? Can we just remove it and
leave the implementation in typemodel.JRealClassType?

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40003
File
dev/core/src/com/google/gwt/dev/javac/rebind/CachedClientDataMap.java
(right):

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40003#newcode39
dev/core/src/com/google/gwt/dev/javac/rebind/CachedClientDataMap.java:39:
// this will throw a ClassCastException if value is not Serializable
Comment is pointless as is. Document with javadoc instead?

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40008
File dev/core/src/com/google/gwt/dev/javac/typemodel/JRealClassType.java
(right):

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40008#newcode290
dev/core/src/com/google/gwt/dev/javac/typemodel/JRealClassType.java:290:
lazyTypeStrongHash = Util.computeStrongName(byteCode);
This isn't exactly what we want either, but it's better than assuming
always stale or taking a long time to compute a hash. Can you add a
comment here that explains that ideally we want to identify staleness
based on a type's structure, not including its code, but we don't have a
quick way to compute a hash for type structure yet?

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40013
File
user/src/com/google/gwt/resources/ext/SupportsGeneratorResultCaching.java
(right):

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40013#newcode41
user/src/com/google/gwt/resources/ext/SupportsGeneratorResultCaching.java:41:
public interface HasFindableResourceDependencies extends
It's cute, but is there actually a benefit to nesting this?

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40014
File
user/src/com/google/gwt/resources/rebind/context/AbstractClientBundleGenerator.java
(right):

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40014#newcode232
user/src/com/google/gwt/resources/rebind/context/AbstractClientBundleGenerator.java:232:
for (JClassType superType : superTypes) {
Why is this for loop necessary? Doesn't getFlattenedSupertypeHierarchy
already do this?

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40014#newcode249
user/src/com/google/gwt/resources/rebind/context/AbstractClientBundleGenerator.java:249:
if (!(type instanceof JRealClassType)) {
Under what situations does this occur?

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40014#newcode510
user/src/com/google/gwt/resources/rebind/context/AbstractClientBundleGenerator.java:510:
* Loop through each of our ResouceGenerator classes, and check those
that
s/that that/that

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40014#newcode532
user/src/com/google/gwt/resources/rebind/context/AbstractClientBundleGenerator.java:532:
// use the jar file itself for the modified date test
Document why

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

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


[gwt-contrib] Re: Generator Result Caching implementation for ClientBundle (issue1236801)

2011-01-24 Thread jbrosenberg


http://gwt-code-reviews.appspot.com/1236801/diff/39001/40008
File dev/core/src/com/google/gwt/dev/javac/typemodel/JRealClassType.java
(right):

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40008#newcode108
dev/core/src/com/google/gwt/dev/javac/typemodel/JRealClassType.java:108:
this.byteCode = byteCode;
On 2011/01/24 18:53:37, zundel wrote:

I was just thinking - queuing up a task here to compute the hash is a

function

it might be nice to offload some work to a thread.  Then, on refresh,

the old

version would always be computed.  This might give us better startup

performance

on muliticore boxes too.



Just a thought - add a TODO if you think it would be worthwhile to

look into.

It's an interesting suggestion.  However, in practice, the need to
compute the hash seems to apply to a relatively small subset of all the
types loaded, and so it would probably be unnecessary overhead to by
default compute a hash for all types loaded.

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

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


[gwt-contrib] Re: Generator Result Caching implementation for ClientBundle (issue1236801)

2011-01-24 Thread zundel

just some nits and a possible TODO


http://gwt-code-reviews.appspot.com/1236801/diff/39001/40003
File
dev/core/src/com/google/gwt/dev/javac/rebind/CachedClientDataMap.java
(right):

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40003#newcode2
dev/core/src/com/google/gwt/dev/javac/rebind/CachedClientDataMap.java:2:
* Copyright 2010 Google Inc.
welcome to 2011

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40008
File dev/core/src/com/google/gwt/dev/javac/typemodel/JRealClassType.java
(right):

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40008#newcode108
dev/core/src/com/google/gwt/dev/javac/typemodel/JRealClassType.java:108:
this.byteCode = byteCode;
I was just thinking - queuing up a task here to compute the hash is a
function it might be nice to offload some work to a thread.  Then, on
refresh, the old version would always be computed.  This might give us
better startup performance on muliticore boxes too.

Just a thought - add a TODO if you think it would be worthwhile to look
into.

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40013
File
user/src/com/google/gwt/resources/ext/SupportsGeneratorResultCaching.java
(right):

http://gwt-code-reviews.appspot.com/1236801/diff/39001/40013#newcode2
user/src/com/google/gwt/resources/ext/SupportsGeneratorResultCaching.java:2:
* Copyright 2010 Google Inc.
2011

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

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


[gwt-contrib] Allows isBoolean() properties to be handled correctly by AutoBeanCodex. (issue1320801)

2011-01-24 Thread bobv

Reviewers: rjrjr,

Description:
Allows isBoolean() properties to be handled correctly by AutoBeanCodex.
Issue 5902.
Moves all method-to-property computations into BeanMethod and
JBeanMethod utiliy enums.
Patch by: bobv
Review by: rjrjr
Reported by: jasonhall


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

Affected files:
  M user/src/com/google/gwt/autobean/rebind/AutoBeanFactoryGenerator.java
  M user/src/com/google/gwt/autobean/rebind/model/AutoBeanFactoryModel.java
  M user/src/com/google/gwt/autobean/rebind/model/AutoBeanMethod.java
  M user/src/com/google/gwt/autobean/rebind/model/AutoBeanType.java
  A user/src/com/google/gwt/autobean/rebind/model/JBeanMethod.java
  M user/src/com/google/gwt/autobean/server/BeanMethod.java
  M user/src/com/google/gwt/autobean/server/BeanPropertyContext.java
  M user/src/com/google/gwt/autobean/server/GetterPropertyContext.java
  M user/src/com/google/gwt/autobean/server/ProxyAutoBean.java
  M user/test/com/google/gwt/autobean/shared/AutoBeanCodexTest.java


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


[gwt-contrib] [google-web-toolkit] r9598 committed - Some fixes to "Only JClassTypes should have a super class".

2011-01-24 Thread codesite-noreply

Revision: 9598
Author: sco...@google.com
Date: Mon Jan 24 06:53:26 2011
Log: Some fixes to "Only JClassTypes should have a super class".

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

Modified:
 /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/ControlFlowAnalyzer.java

===
---  
/trunk/dev/core/src/com/google/gwt/dev/jjs/impl/ControlFlowAnalyzer.java	 
Sat Jan 22 17:19:44 2011
+++  
/trunk/dev/core/src/com/google/gwt/dev/jjs/impl/ControlFlowAnalyzer.java	 
Mon Jan 24 06:53:26 2011

@@ -117,7 +117,8 @@
   true, isInstantiated);
 } else {
   // anything[] -> Object
-  rescue(program.getTypeJavaLangObject(), true, isInstantiated);
+  // But instead of Object, rescue the base Array implementation  
type.

+  rescue(baseArrayType, true, isInstantiated);
 }
   }

@@ -130,8 +131,6 @@
 }
   }

-  // Rescue the base Array type
-  rescue(program.getIndexedType("Array"), true, isInstantiated);
   return false;
 }

@@ -710,6 +709,7 @@
 }
   }

+  private JDeclaredType baseArrayType;
   private DependencyRecorder dependencyRecorder;

   private Set fieldsWritten = new HashSet();
@@ -739,6 +739,7 @@

   public ControlFlowAnalyzer(ControlFlowAnalyzer cfa) {
 program = cfa.program;
+baseArrayType = cfa.baseArrayType;
 fieldsWritten = new HashSet(cfa.fieldsWritten);
 instantiatedTypes = new HashSet(cfa.instantiatedTypes);
 liveFieldsAndMethods = new HashSet(cfa.liveFieldsAndMethods);
@@ -752,6 +753,7 @@

   public ControlFlowAnalyzer(JProgram program) {
 this.program = program;
+baseArrayType = program.getIndexedType("Array");
 buildMethodsOverriding();
   }

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


[gwt-contrib] [google-web-toolkit] r9597 committed - Update the mac xpcom plugin for Gecko 2.0 (FF4). This is a platform s...

2011-01-24 Thread codesite-noreply

Revision: 9597
Author: con...@google.com
Date: Mon Jan 24 04:30:43 2011
Log: Update the mac xpcom plugin for Gecko 2.0 (FF4).  This is a platform  
switch for

mac: ppc+i386 to i386+x86_64 to mirror Firefox's platform shift.

Also, fixup the linux libxul linkage: we had been getting lucky with  
-rdynamic

on linux for the JS symbols which can actually be found in libxul (and are
required for the mac build).

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

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

Modified:
 /trunk/plugins/config.mk
 /trunk/plugins/xpcom/Makefile
 /trunk/plugins/xpcom/install-template.rdf
 /trunk/plugins/xpcom/prebuilt/extension/chrome.manifest
  
/trunk/plugins/xpcom/prebuilt/extension/lib/Darwin-gcc3/ff3/libgwt_dev_ff3.dylib
  
/trunk/plugins/xpcom/prebuilt/extension/lib/Darwin-gcc3/ff35/libgwt_dev_ff35.dylib
  
/trunk/plugins/xpcom/prebuilt/extension/lib/Darwin-gcc3/ff36/libgwt_dev_ff36.dylib
  
/trunk/plugins/xpcom/prebuilt/extension/lib/Darwin-gcc3/ff40/libgwt_dev_ff40.dylib
  
/trunk/plugins/xpcom/prebuilt/extension/lib/Linux_x86-gcc3/ff3/libgwt_dev_ff3.so
  
/trunk/plugins/xpcom/prebuilt/extension/lib/Linux_x86-gcc3/ff3+/libgwt_dev_ff3+.so
  
/trunk/plugins/xpcom/prebuilt/extension/lib/Linux_x86-gcc3/ff35/libgwt_dev_ff35.so
  
/trunk/plugins/xpcom/prebuilt/extension/lib/Linux_x86-gcc3/ff36/libgwt_dev_ff36.so
  
/trunk/plugins/xpcom/prebuilt/extension/lib/Linux_x86-gcc3/ff40/libgwt_dev_ff40.so
  
/trunk/plugins/xpcom/prebuilt/extension/lib/Linux_x86_64-gcc3/ff3/libgwt_dev_ff3.so
  
/trunk/plugins/xpcom/prebuilt/extension/lib/Linux_x86_64-gcc3/ff3+/libgwt_dev_ff3+.so
  
/trunk/plugins/xpcom/prebuilt/extension/lib/Linux_x86_64-gcc3/ff35/libgwt_dev_ff35.so
  
/trunk/plugins/xpcom/prebuilt/extension/lib/Linux_x86_64-gcc3/ff40/libgwt_dev_ff40.so

 /trunk/plugins/xpcom/prebuilt/gwt-dev-plugin.xpi

===
--- /trunk/plugins/config.mkThu Sep  3 15:22:56 2009
+++ /trunk/plugins/config.mkMon Jan 24 04:30:43 2011
@@ -69,24 +69,20 @@
 MARCH=$(ARCH)
 ifeq ($(ARCH),x86)
 MARCH=i386
-OMARCH=ppc
 endif
-ifeq ($(ARCH),ppc)
-OMARCH=i386
-endif

 # Set OS as well as CFLAGS, CXX, and other common make variables
 ifeq ($(shell uname),Linux)
 OS=linux
 BASECFLAGS= -g -O2 -fPIC $(INC) -rdynamic
 ARCHCFLAGS=-m$(FLAG32BIT)
-ALLARCHCFLAGS=$(ARCHCFLAGS)
+ALLARCHCFLAGS=
 endif
 ifeq ($(shell uname),Darwin)
 OS=mac
 BASECFLAGS= -g -O2 -fPIC $(INC) -D__mac
 ARCHCFLAGS=-arch $(MARCH)
-ALLARCHCFLAGS=-arch i386 -arch ppc
+ALLARCHCFLAGS=-arch i386 -arch ppc -arch x86_64
 AR=libtool
 ARFLAGS=-static -o
 endif
===
--- /trunk/plugins/xpcom/Makefile   Wed Jan 12 11:43:57 2011
+++ /trunk/plugins/xpcom/Makefile   Mon Jan 24 04:30:43 2011
@@ -72,6 +72,9 @@
 MOZJS_DLLFLAGS = -lmozjs
 MOZALLOC_DLLFLAGS =

+#default ALLARCHFLAGS for pre-FF4
+ALLARCHCFLAGS=-arch i386 -arch ppc
+
 ifeq ($(BROWSER),ff3)
 GECKO_VERSION   = 1.9.0
 CFLAGS += -DGECKO_VERSION=1900
@@ -93,8 +96,13 @@
 GECKO_VERSION   = 2.0.0
 CFLAGS += -DGECKO_VERSION=2000
 MOZALLOC_DLLFLAGS = -lmozalloc
-#MOZJS is statically linked in FF4
-MOZJS_DLLFLAGS =
+MOZJS_DLLFLAGS = -lxul
+
+#FF4 drops PPC, adds x86_64. Use FLAG32BIT as a switch in the unified  
headers.

+ifeq ($(OS),mac)
+ALLARCHCFLAGS = -arch i386 -arch x86_64 -Xarch_i386 -DFLAG32BIT=32  
-Xarch_x86_64 -DFLAG32BIT=64

+endif
+
 else
 $(error Unrecognized BROWSER of $(BROWSER) - options are ff3, ff3+, ff35,  
ff36, ff40)

 endif
@@ -133,7 +141,6 @@
 XPIDL_FLAGS   = -I$(GECKO_SDK)/idl

 DLLFLAGS += \
-   -L$(DEFAULT_FIREFOX_LIBS) \
-L$(GECKO_LIBS) \
-Wl,$(RUN_PATH_FLAG),$(GECKO_LIBS) \
$(GECKO_DLLFLAGS) $(NSPR_DLLFLAGS) \
@@ -212,7 +219,7 @@
 	[ ! -x $(XPIDL) -o \( -e $(FF_HEADER) -a ! -w $(FF_HEADER) \) ] ||  
$(XPIDL) $(XPIDL_FLAGS) -m header -e $@ $<


 $(FF_DLL): $(FF_OBJS) $(COMMON)
-   $(CXX) -m$(FLAG32BIT) -o $@ $(FF_OBJS) $(COMMON) $(DLLFLAGS)
+   $(CXX) -o $@ $(FF_OBJS) $(COMMON) $(DLLFLAGS)
@mkdir -p $(FF_PLATFORM_DIR)
cp $(FF_DLL) $(FF_PLATFORM_DIR)/

===
--- /trunk/plugins/xpcom/install-template.rdf   Wed Jan 12 11:43:57 2011
+++ /trunk/plugins/xpcom/install-template.rdf   Mon Jan 24 04:30:43 2011
@@ -26,6 +26,7 @@
 Linux_x86_64-gcc3
 WINNT_x86-msvc
 Darwin_x86-gcc3
+Darwin_x86_64-gcc3
 Darwin_ppc-gcc3

  
chrome://gwt-dev-plugin/content/options.xul

===
--- /trunk/plugins/xpcom/prebuilt/extension/chrome.manifest	Wed Jan 12  
11:43:57 2011
+++ /trunk/plugins/xpcom/prebuilt/extension/chrome.manifest	Mon Jan 24  
04:30:43 2011

@@ -3,8 +3,10 @@

 binary-component lib/Linux_x86_64-gcc3/ff40/libgwt_dev_ff40.so  
ABI=Linux_x86_64-gcc3
 binary-component lib/Linux_x86-gcc3/ff40/libgwt_dev_ff40.so  
ABI=Linux_x86-gcc3

-# Windows and Mac are not yet supported
-# binary-component lib/Darwin-gcc3/ff40/libgwt_dev

[gwt-contrib] Re: Update the mac xpcom plugin for Gecko 2.0 (FF4). This is a platform switch for (issue1311802)

2011-01-24 Thread conroy


http://gwt-code-reviews.appspot.com/1311802/diff/1/2
File plugins/config.mk (right):

http://gwt-code-reviews.appspot.com/1311802/diff/1/2#newcode85
plugins/config.mk:85: ALLARCHCFLAGS=-arch i386 -arch ppc -arch x86_64
On 2011/01/24 02:47:49, jat wrote:

So we will build with all 3 architectures?  I thought PPC was being

phased out,

so we would have x86/x86_64 instead of x86/ppc?


This lets us continue to build the old plugin with i386/ppc.

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

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


[gwt-contrib] Re: Add option to use JSONP in ExternalTextResource (issue1310801)

2011-01-24 Thread bobv

Why maintain both modes of operation? There's more code and more stuff
to test when JSONP is a more general solution than XHR.


http://gwt-code-reviews.appspot.com/1310801/diff/1/3
File user/src/com/google/gwt/jsonp/client/JsonpRequest.java (right):

http://gwt-code-reviews.appspot.com/1310801/diff/1/3#newcode70
user/src/com/google/gwt/jsonp/client/JsonpRequest.java:70: }
Extra whitespace.  GPE usually prevents formatting weirdness.

http://gwt-code-reviews.appspot.com/1310801/diff/1/3#newcode75
user/src/com/google/gwt/jsonp/client/JsonpRequest.java:75: // The "P"
suffix must stay in sync with ExternalTextResourceGenerator.java
Use a shared constant field?

http://gwt-code-reviews.appspot.com/1310801/diff/1/3#newcode149
user/src/com/google/gwt/jsonp/client/JsonpRequest.java:149: String id) {
Formatting.

http://gwt-code-reviews.appspot.com/1310801/diff/1/3#newcode219
user/src/com/google/gwt/jsonp/client/JsonpRequest.java:219: return
callbackId.startsWith("P");
This seems kind of hacky.  Is there a way to do this in a way that would
prevent someone from accidentally triggering this behavior with a
poorly-chosen prefix?

http://gwt-code-reviews.appspot.com/1310801/diff/1/3#newcode279
user/src/com/google/gwt/jsonp/client/JsonpRequest.java:279: if
(!canHaveMultipleRequestsForId) {
Could you reverse the order of the then and else clauses to prevent a
negative comparison?

http://gwt-code-reviews.appspot.com/1310801/diff/1/3#newcode289
user/src/com/google/gwt/jsonp/client/JsonpRequest.java:289: if
(callbackWrapper == null) {
if (!callbackWrapper) is more idiomatic.

http://gwt-code-reviews.appspot.com/1310801/diff/1/5
File user/src/com/google/gwt/resources/Resources.gwt.xml (right):

http://gwt-code-reviews.appspot.com/1310801/diff/1/5#newcode83
user/src/com/google/gwt/resources/Resources.gwt.xml:83: 
Why not always use JSONP?  It's guaranteed to work across more
deployment schemes than XHR, right?

http://gwt-code-reviews.appspot.com/1310801/diff/1/6
File
user/src/com/google/gwt/resources/client/impl/ExternalTextResourcePrototype.java
(right):

http://gwt-code-reviews.appspot.com/1310801/diff/1/6#newcode87
user/src/com/google/gwt/resources/client/impl/ExternalTextResourcePrototype.java:87:
};
Extra whitespace.

http://gwt-code-reviews.appspot.com/1310801/diff/1/6#newcode170
user/src/com/google/gwt/resources/client/impl/ExternalTextResourcePrototype.java:170:
//  }
Delete this?

http://gwt-code-reviews.appspot.com/1310801/diff/1/6#newcode172
user/src/com/google/gwt/resources/client/impl/ExternalTextResourcePrototype.java:172:
if (!"".equals(md5Hash)) {
How about a null comparison instead?

http://gwt-code-reviews.appspot.com/1310801/diff/1/7
File
user/src/com/google/gwt/resources/rg/ExternalTextResourceGenerator.java
(right):

http://gwt-code-reviews.appspot.com/1310801/diff/1/7#newcode54
user/src/com/google/gwt/resources/rg/ExternalTextResourceGenerator.java:54:
static final String JSONP_CALLBACK_PREFIX = "__gwt_jsonp__.P";
If the .P is special, it should be in a constant field.

http://gwt-code-reviews.appspot.com/1310801/diff/1/7#newcode184
user/src/com/google/gwt/resources/rg/ExternalTextResourceGenerator.java:184:
if (Boolean.parseBoolean(useJsonpProp)) {
How about

return Boolean.parseBoolean(useJsonProp);

http://gwt-code-reviews.appspot.com/1310801/diff/1/11
File
user/test/com/google/gwt/resources/client/ExternalTextResourceJsonpTest.java
(right):

http://gwt-code-reviews.appspot.com/1310801/diff/1/11#newcode2
user/test/com/google/gwt/resources/client/ExternalTextResourceJsonpTest.java:2:
* Copyright 2010 Google Inc.
2011

http://gwt-code-reviews.appspot.com/1310801/diff/1/12
File
user/test/com/google/gwt/resources/client/ExternalTextResourceTest.java
(right):

http://gwt-code-reviews.appspot.com/1310801/diff/1/12#newcode2
user/test/com/google/gwt/resources/client/ExternalTextResourceTest.java:2:
* Copyright 2008 Google Inc.
2011

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

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


[gwt-contrib] Re: Update the mac xpcom plugin for Gecko 2.0 (FF4). This is a platform switch for (issue1311802)

2011-01-24 Thread fabiomfv

LGTM

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

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