[gwt-contrib] Re: Code Review Request: Fix flaxy MessageTransport test

2010-03-16 Thread Rajeev Dayal
I'm testing that if you try to use MessageTransport.executeRequestAsync(..)
and the server side of the network has closed its input stream, then an
exception will be thrown (an ExecutionException with an underlying cause of
IllegalStateException).

I don't think shutdownInput(..) would work, because it says that any input
coming in will be silently discarded. I could probably use
network.getClientSocket(..).shutdownOutput() to achieve the same effect,
though I was really trying to test the case where the server side shut down
the input stream.

I don't know if there is a better way to do this than polling.


On Mon, Mar 15, 2010 at 4:28 PM,  wrote:

> Now we understand the mysterious failure. Thanks for finding it!
>
>
> http://gwt-code-reviews.appspot.com/111808/diff/1/2
> File
> dev/core/test/com/google/gwt/dev/shell/remoteui/MessageTransportTest.java
> (right):
>
> http://gwt-code-reviews.appspot.com/111808/diff/1/2#newcode135
> Line 135: sleepCycles++;
> We should fail with a clear message if the socket cannot be closed,
> rather than a misleading message down stream.
>
>
> http://gwt-code-reviews.appspot.com/111808
>

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

[gwt-contrib] Add build.xml file with checkstyle target; pass checkstyle

2010-03-16 Thread rice

Reviewers: Ray Ryan,

Description:
Add build.xml file with checkstyle target; pass checkstyle

Review by: rj...@google.com

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

Affected files:
  M bikeshed/build.xml
  M bikeshed/src/com/google/gwt/bikeshed/cells/client/ProfitLossCell.java
  M bikeshed/src/com/google/gwt/bikeshed/sample/stocks/server/Stocks.java
  M bikeshed/src/com/google/gwt/sample/expenses/client/Expenses.java
  M bikeshed/src/com/google/gwt/sample/expenses/client/Shell.java
  M bikeshed/src/com/google/gwt/sample/expenses/gen/EmployeeRequestImpl.java
  M  
bikeshed/src/com/google/gwt/sample/expenses/gen/ExpenseRequestFactoryImpl.java

  M bikeshed/src/com/google/gwt/sample/expenses/gen/ReportRequestImpl.java
  M  
bikeshed/src/com/google/gwt/sample/expenses/server/domain/CreationVisitor.java

  M bikeshed/src/com/google/gwt/sample/expenses/server/domain/Currency.java
  M bikeshed/src/com/google/gwt/sample/expenses/server/domain/Employee.java
  M bikeshed/src/com/google/gwt/sample/expenses/server/domain/Entity.java
  M  
bikeshed/src/com/google/gwt/sample/expenses/server/domain/EntityVisitor.java
  M  
bikeshed/src/com/google/gwt/sample/expenses/server/domain/NullFieldFiller.java
  M  
bikeshed/src/com/google/gwt/sample/expenses/server/domain/RelationshipRefreshingVisitor.java
  M  
bikeshed/src/com/google/gwt/sample/expenses/server/domain/RelationshipValidationVisitor.java

  M bikeshed/src/com/google/gwt/sample/expenses/server/domain/Report.java
  M  
bikeshed/src/com/google/gwt/sample/expenses/server/domain/ReportItem.java

  M bikeshed/src/com/google/gwt/sample/expenses/server/domain/Storage.java
  M bikeshed/src/com/google/gwt/valuestore/shared/Values.java
  M  
bikeshed/test/com/google/gwt/sample/expenses/server/domain/CreationVisitorTest.java

  A bikeshed/war/symbols.txt


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


[gwt-contrib] Re: Don't ever set the "base" variable to null. It is supposed to be the empty string

2010-03-16 Thread spoon

I'm working on a test case for this tricky code, but it's going to take
several hours to put together.  Shall we put in the one-line fixes?  The
selection scripts as they are cause null pointer dereferences in some
situations.

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

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


[gwt-contrib] Don't ever set the "base" variable to null. It is supposed to be the empty string

2010-03-16 Thread spoon

Reviewers: jgw,

Description:
Don't ever set the "base" variable to null.  It is supposed to be the
empty string
if it hasn't been set yet.


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

Affected files:
  M dev/core/src/com/google/gwt/core/linker/IFrameTemplate.js
  M dev/core/src/com/google/gwt/core/linker/XSTemplate.js


Index: dev/core/src/com/google/gwt/core/linker/IFrameTemplate.js
===
--- dev/core/src/com/google/gwt/core/linker/IFrameTemplate.js	(revision  
7732)

+++ dev/core/src/com/google/gwt/core/linker/IFrameTemplate.js   (working copy)
@@ -120,7 +120,8 @@
 ,markerId = "__gwt_marker___MODULE_NAME__"
 ,markerScript;

-if (base = metaProps['baseUrl']) {
+if (metaProps['baseUrl']) {
+  base = metaProps['baseUrl'];
   return;
 }

Index: dev/core/src/com/google/gwt/core/linker/XSTemplate.js
===
--- dev/core/src/com/google/gwt/core/linker/XSTemplate.js   (revision 7732)
+++ dev/core/src/com/google/gwt/core/linker/XSTemplate.js   (working copy)
@@ -104,7 +104,8 @@
 ,markerId = "__gwt_marker___MODULE_NAME__"
 ,markerScript;

-if (base = metaProps['baseUrl']) {
+if (metaProps['baseUrl']) {
+  base = metaProps['baseUrl'];
   return;
 }



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


[gwt-contrib] Issue 4720: PopupPanel#removeFromParent doesn't remove glass

2010-03-16 Thread jlabanca

Reviewers: jgw,

Description:
Calling PopupPanel#removeFromParent or
RootPanel.get().remove(popupPanel) does not hide the glass.

Fix:
=
onUnload now uses ResizeAnimation to complete the hide process if the
PopupPanel isn't already hidden.

While the fix seems trivial, this bug actually revealed a few problems
that can lead to invalid states. First of all, prior to this patch,
calling hide() would actually call setState() twice (once in hide, once
in onUnload).  Second, calling hide() synchronously after calling show
with animations could would leave the PopupPanel in an invalid state.

Testing:
===
I added unit tests.

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

Affected files:
  user/src/com/google/gwt/user/client/ui/PopupPanel.java
  user/test/com/google/gwt/user/client/ui/PopupTest.java


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


[gwt-contrib] Re: Don't ever set the "base" variable to null. It is supposed to be the empty string

2010-03-16 Thread jgw

On 2010/03/16 15:49:26, Lex wrote:

I'm working on a test case for this tricky code, but it's going to

take several

hours to put together.  Shall we put in the one-line fixes?  The

selection

scripts as they are cause null pointer dereferences in some

situations.

That sounds fine to me for now. Tests would be good, but we can always
do them as two separate commits.

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

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


Re: [gwt-contrib] Support runAsync with the cross-site linker.

2010-03-16 Thread Lex Spoon
On Mon, Mar 15, 2010 at 8:34 PM, Joel Webber  wrote:

> That's great news, and will really help with efforts to make our linkers
> more sane. Out of curiosity, what's the strategy for loading fragments into
> the enclosing namespace (and yes, that's the sound of me being too lazy to
> dig into the patch)?
>

No, it should be documented separately from the patch.  Here you go:

http://code.google.com/p/google-web-toolkit/wiki/CrossSiteRunAsync


-Lex

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

[gwt-contrib] [google-web-toolkit] r7735 committed - Created wiki page through web user interface.

2010-03-16 Thread codesite-noreply

Revision: 7735
Author: sp...@google.com
Date: Tue Mar 16 09:29:56 2010
Log: Created wiki page through web user interface.
http://code.google.com/p/google-web-toolkit/source/detail?r=7735

Added:
 /wiki/CrossSiteRunAsync.wiki

===
--- /dev/null
+++ /wiki/CrossSiteRunAsync.wikiTue Mar 16 09:29:56 2010
@@ -0,0 +1,58 @@
+#How code is loaded on demand in the cross-site linker
+
+= Introduction =
+
+The cross-site linker has two challenges for runAsync.  First, the code  
can't be loaded with XHR, because of the Some Origin Policy.  Second, the  
code cannot be loaded at the top level of any iframe, but instead must be  
inserted into an inner scope of a function.

+
+This page describes the general strategy used.  The precise details, e.g.  
the label names, are subject to change.

+
+= Inserting code into a function =
+
+In the initial code download, GWT code is wrapped in a function, and that  
function exports an "installCode" function as an expando off of the  
function itself:

+{{{
+function my_gwt_app() {
+  var jslink = new Object();
+  my_gwt_ap.installCode = function(code) {
+var install = new Function("jslink", code);
+install(jslink);
+  }
+  // rest of initial code
+}
+}}}
+
+Since the scope of each "new Function" call is different, all cross-island  
references must go through the jslink object.  New definitions must be  
installed like this:

+{{{
+my_gwt_app.installCode("jslink.foo = function foo() { }")
+}}}
+
+Uses of an identifier from another island look like this:
+{{{
+my_gwt_app.installCode("jslink.foo();")
+}}}
+
+The GWT compiler includes an optional pass that is controlled by the  
configuration parameter `compiler.predeclare.cross.island.references`.   
It's false by default, but individual linkers can turn it on when needed.   
Here's how the cross-site linker itself turns on this pass:

+{{{
+value="true">

+  
+
+}}}
+
+
+= Cross-Site code load =
+
+Cross-site code is loaded using class CrossLiteLoadingStrategy.
+
+The general technique is like JSONP.  Script tags aren't subject to the  
Same Origin Policy, so they can be used to download the code.  The content  
downloaded via the script tag has been wrapped as follows:

+{{{
+__MODULE_FUNCTION__['runAsyncCallback3']('here is the downloaded code')
+}}}
+
+Before inserting the script tag, CrossSiteLoadingStrategy must insert a  
callback to handle that code.  The callback updates the runAsync book  
keeping and then uses the installCode function to actually load the code.

+
+= Detecting download errors =
+
+Detecting download errors with XHR is straightforward, but trickier for  
script tags.  At the time of writing, the implementation uses all of the  
following attributes on the created script tag: onerror, onload, and  
onreadystatechange.  Additionally, onreadystatechange does not indicate  
whether the download actually succeeded or not.  Thus, the callbacks are  
all tolerant of bad code.  Correspondingly, LoadErrorHandler is now called  
LoadFinishedHandler.

+
+= Retry =
+
+Retrying failed downloads is also tricky on some browsers.  There appears  
to be a heuristic in some browsers that if a script tag download for a URL  
fails three times, then no further downloads of that URL will be  
attempted.  To work around this, CrossSiteLoadingStrategy adds a serial  
number to each request.  Instead of requesting deferredjs/123.cache.js, it  
uses deferredjs/123.cache.js?serial=0 .


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


[gwt-contrib] Update currency data to Unicode CLDR 1.7.2.

2010-03-16 Thread jat

Reviewers: shanjian,

Description:
Update currency data to Unicode CLDR 1.7.2.

Patch by: jat
Review by: shanjian


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

Affected files:
  M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData.properties
  M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_af.properties
  M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_ak.properties
  M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_am.properties
  M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_ar.properties
  M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_as.properties
  M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_az.properties
  M  
user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_az_Cyrl.properties

  M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_be.properties
  M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_bg.properties
  M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_bn.properties
  M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_bo.properties
  M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_bs.properties
  M  
user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_byn.properties

  M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_ca.properties
  M  
user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_cch.properties

  M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_cs.properties
  M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_cy.properties
  M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_da.properties
  M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_de.properties
  M  
user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_de_BE.properties
  M  
user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_de_LU.properties

  M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_dv.properties
  M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_dz.properties
  M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_ee.properties
  M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_el.properties
  M  
user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_el_POLYTON.properties

  M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_en.properties
  M  
user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_en_AU.properties
  M  
user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_en_BE.properties
  M  
user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_en_BW.properties
  A  
user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_en_BZ.properties
  M  
user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_en_CA.properties
  M  
user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_en_HK.properties
  A  
user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_en_JM.properties
  M  
user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_en_MT.properties
  A  
user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_en_NA.properties
  M  
user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_en_NZ.properties
  M  
user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_en_PH.properties
  A  
user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_en_PK.properties
  M  
user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_en_SG.properties
  A  
user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_en_TT.properties

  M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_es.properties
  M  
user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_es_AR.properties
  M  
user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_es_CL.properties
  M  
user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_es_CO.properties
  M  
user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_es_EC.properties
  A  
user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_es_GT.properties
  A  
user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_es_HN.properties
  M  
user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_es_MX.properties
  M  
user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_es_PR.properties
  A  
user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_es_US.properties
  M  
user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_es_UY.properties

  M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_et.properties
  M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_eu.properties
  M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_fa.properties
  M  
user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_fa_AF.properties

  M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_fi.properties
  M  
user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_fil.properties

  M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_fo.properties
  M user/src/

Re: [gwt-contrib] Support runAsync with the cross-site linker.

2010-03-16 Thread Eric Ayers
Something is screwy with riedvelt, and I can't leave a comment on
XSTemplate.js

My comment isn't really about your patch in particular, but the patterns we
are using in the linker templates.  I wish that stanzas of code common to
many linkers, like the calling of __gwtStatsEvent() could be extracted and
put into the template with variable substitution.  For example, adding the
sessionId field to the event works fine here, but there are several linkers
outside of GWT that will need to be updated to get the same fix.

-Eric.

On Mon, Mar 15, 2010 at 6:17 PM,  wrote:

> Reviewers: cromwellian,
>
> Description:
> Support runAsync with the cross-site linker.
>
>
> Please review this at http://gwt-code-reviews.appspot.com/213801
>
> Affected files:
>  M
> dev/core/src/com/google/gwt/core/ext/linker/impl/SelectionScriptLinker.java
>  M dev/core/src/com/google/gwt/core/linker/IFrameLinker.java
>  M dev/core/src/com/google/gwt/core/linker/XSLinker.java
>  M dev/core/src/com/google/gwt/core/linker/XSTemplate.js
>  M dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java
>  M dev/core/src/com/google/gwt/dev/jjs/impl/FragmentLoaderCreator.java
>  A
> dev/core/src/com/google/gwt/dev/jjs/impl/HandleCrossIslandReferences.java
>  M dev/core/src/com/google/gwt/dev/jjs/impl/JsFunctionClusterer.java
>  M dev/core/src/com/google/gwt/dev/js/JsToStringGenerationVisitor.java
>  A dev/core/test/com/google/gwt/dev/js/JavaScriptStringTest.java
>  M user/src/com/google/gwt/core/CompilerParameters.gwt.xml
>  M user/src/com/google/gwt/core/Core.gwt.xml
>  A user/src/com/google/gwt/core/XSLinker.gwt.xml
>  user/src/com/google/gwt/core/client/impl/AsyncFragmentLoader.java
>  A user/src/com/google/gwt/core/client/impl/CrossSiteLoadingStrategy.java
>  M user/src/com/google/gwt/core/client/impl/XhrLoadingStrategy.java
>  M user/test/com/google/gwt/core/client/impl/AsyncFragmentLoaderTest.java
>  M user/test/com/google/gwt/core/client/impl/XhrLoadingStrategyTest.java
>  A user/test/com/google/gwt/dev/jjs/CompilerSuiteCrossSite.gwt.xml
>  A user/test/com/google/gwt/dev/jjs/CrossSiteRunAsyncFailure.gwt.xml
>  A user/test/com/google/gwt/dev/jjs/CrossSiteRunAsyncMetrics.gwt.xml
>  A user/test/com/google/gwt/dev/jjs/CrossSiteRunAsyncSuite.java
>  M user/test/com/google/gwt/dev/jjs/RunAsyncFailure.gwt.xml
>  M user/test/com/google/gwt/dev/jjs/RunAsyncMetricsIntegrationTest.gwt.xml
>  user/test/com/google/gwt/dev/jjs/public/empty-gwt-stats.js
>  A user/test/com/google/gwt/dev/jjs/test/CrossSiteRunAsyncFailureTest.java
>  A user/test/com/google/gwt/dev/jjs/test/CrossSiteRunAsyncMetricsTest.java
>  A user/test/com/google/gwt/dev/jjs/test/CrossSiteRunAsyncTest.java
>  M user/test/com/google/gwt/dev/jjs/test/RunAsyncFailureTest.java
>  A
> user/test/com/google/gwt/user/client/runasync/CrossSiteLoadingStrategyForRunAsyncFailureTest.java
>  D
> user/test/com/google/gwt/user/server/runasync/RunAsyncFailureIFrameLinker.java
>
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>



-- 
Eric Z. Ayers
Google Web Toolkit, Atlanta, GA USA
Sign up now for Google I/O 2010: May 19-20, http://code.google.com/io

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

[gwt-contrib] DOMImpl#eventGetTypeInt returns NULL for unknown event types

2010-03-16 Thread jlabanca

Reviewers: Dan Rice,

Description:
DOMImpl#eventGetTypeInt returns NULL for unknown event types instead of
an int, resulting in an exception.

Fix:
===
Added default case that returns -1 and updated JavaDoc.

Testing:

Added a unit test.

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

Affected files:
  user/src/com/google/gwt/user/client/DOM.java
  user/src/com/google/gwt/user/client/Event.java
  user/src/com/google/gwt/user/client/impl/DOMImpl.java
  user/test/com/google/gwt/user/client/EventTest.java


Index: user/test/com/google/gwt/user/client/EventTest.java
===
--- user/test/com/google/gwt/user/client/EventTest.java (revision 7734)
+++ user/test/com/google/gwt/user/client/EventTest.java (working copy)
@@ -381,6 +381,24 @@
 assertTrue(Event.fireNativePreviewEvent(null));
   }

+  public void testGetTypeInt() {
+assertEquals(Event.ONBLUR, Event.getTypeInt("blur"));
+assertEquals(Event.ONCHANGE, Event.getTypeInt("change"));
+assertEquals(Event.ONCLICK, Event.getTypeInt("click"));
+assertEquals(Event.ONERROR, Event.getTypeInt("error"));
+assertEquals(Event.ONFOCUS, Event.getTypeInt("focus"));
+assertEquals(Event.ONKEYDOWN, Event.getTypeInt("keydown"));
+assertEquals(Event.ONKEYPRESS, Event.getTypeInt("keypress"));
+assertEquals(Event.ONKEYUP, Event.getTypeInt("keyup"));
+assertEquals(Event.ONLOAD, Event.getTypeInt("load"));
+assertEquals(Event.ONMOUSEDOWN, Event.getTypeInt("mousedown"));
+assertEquals(Event.ONMOUSEMOVE, Event.getTypeInt("mousemove"));
+assertEquals(Event.ONMOUSEOUT, Event.getTypeInt("mouseout"));
+assertEquals(Event.ONMOUSEOVER, Event.getTypeInt("mouseover"));
+assertEquals(Event.ONMOUSEUP, Event.getTypeInt("mouseup"));
+assertEquals(-1, Event.getTypeInt("undefined"));
+  }
+
   /**
* Test that legacy EventPreview and NativePreviewHandlers can both  
cancel the

* event.
Index: user/src/com/google/gwt/user/client/DOM.java
===
--- user/src/com/google/gwt/user/client/DOM.java(revision 7734)
+++ user/src/com/google/gwt/user/client/DOM.java(working copy)
@@ -585,7 +585,7 @@
* Gets the enumerated type of this event (as defined in {...@link Event}).
*
* @param evt the event to be tested
-   * @return the event's enumerated type
+   * @return the event's enumerated type, or -1 if not defined
*/
   public static int eventGetType(Event evt) {
 return impl.eventGetTypeInt(evt);
Index: user/src/com/google/gwt/user/client/impl/DOMImpl.java
===
--- user/src/com/google/gwt/user/client/impl/DOMImpl.java   (revision 7734)
+++ user/src/com/google/gwt/user/client/impl/DOMImpl.java   (working copy)
@@ -84,6 +84,7 @@
 case "DOMMouseScroll": return 0x2;
 case "contextmenu": return 0x4;
 case "paste": return 0x8;
+default: return -1;
 }
   }-*/;

Index: user/src/com/google/gwt/user/client/Event.java
===
--- user/src/com/google/gwt/user/client/Event.java  (revision 7734)
+++ user/src/com/google/gwt/user/client/Event.java  (working copy)
@@ -485,7 +485,7 @@
* Gets the enumerated type of this event given a valid event type name.
*
* @param typeName the typeName to be tested
-   * @return the event's enumerated type
+   * @return the event's enumerated type, or -1 if not defined
*/
   public static int getTypeInt(String typeName) {
 return DOM.impl.eventGetTypeInt(typeName);


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


[gwt-contrib] Re: Update currency data to Unicode CLDR 1.7.2.

2010-03-16 Thread John Tamplin
On Tue, Mar 16, 2010 at 1:25 PM, Shanjian Li  wrote:

> Do you think that we should only include currency that is being used, not
> those historical currency? Like following:
> -ZWD = Zimbabwe Dollar|Z$ +ZWD = Zimbabwean Dollar|Z$|0|1 +ZWL =
> Zimbabwean Dollar (2009) +ZWR = Zimbabwean Dollar (2008)|||1
> The last 2 items are not being used any more. And there are many more such
> kind of currencies.
>

The "1" at the end of the line marks the currency as deprecated.  A user has
to specifically ask for deprecated currencies to be included in the list of
available currencies.

The deprecated currencies can still be referenced directly, and I think they
need to stay there.  Imagine you have an app recording transactions -- do
you want to lose the ability to display old transactions if the currency
they were made in becomes deprecated?

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

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

[gwt-contrib] Re: DOMImpl#eventGetTypeInt returns NULL for unknown event types

2010-03-16 Thread rice

LGTM

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

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


Re: [gwt-contrib] Support runAsync with the cross-site linker.

2010-03-16 Thread Lex Spoon
On Tue, Mar 16, 2010 at 11:54 AM, Eric Ayers  wrote:

> Something is screwy with riedvelt, and I can't leave a comment on
> XSTemplate.js
>
> My comment isn't really about your patch in particular, but the patterns we
> are using in the linker templates.  I wish that stanzas of code common to
> many linkers, like the calling of __gwtStatsEvent() could be extracted and
> put into the template with variable substitution.  For example, adding the
> sessionId field to the event works fine here, but there are several linkers
> outside of GWT that will need to be updated to get the same fix.
>

Yes.  Indeed, this fix originally went into the iframe linker and it was
overlooked for the cross-site linker.  Using more templating should help us
not have to duplicate code so much.

I was thinking in the short term to pull out computeScriptBase and
processMetas into their own file.  Code that wants to pull it in could
insert COMPUTE_SCRIPT_BASE or PROCESS_METAS at the place it should go.  As
well, the code can then be tested more conveniently.

Perhaps, though, we may as well define a general INCLUDE("processMetas.js")
?


Lex

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

[gwt-contrib] Avira and HTML/CryptedGen (again)

2010-03-16 Thread Matt Mastracci
We started getting reports of the "HTML/Crypted.Gen" being detected in our 
Chrome extension again. I've managed to reproduce it - the signature seems to 
be the exact set of strings they use:


.fromCharCode
.charCodeAt
nodeValue
for
0,0,0,0,0,0
Math.min


I kid you not - this is their signature for an encrypted JS virus. I can't seem 
to remove a single character from any of these tokens without turning it from a 
dangerous virus to a harmless bit of JS.  Order doesn't seem to be important 
(although I haven't experimented with this that much).

I think I'll be able to work around this by replacing any sequence of six zeros 
separated by commas with the sequence 0,0,0,[space]0,0,0.

Matt.

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


Re: [gwt-contrib] Avira and HTML/CryptedGen (again)

2010-03-16 Thread John Tamplin
On Tue, Mar 16, 2010 at 2:07 PM, Matt Mastracci wrote:

> We started getting reports of the "HTML/Crypted.Gen" being detected in our
> Chrome extension again. I've managed to reproduce it - the signature seems
> to be the exact set of strings they use:
>
> 
> .fromCharCode
> .charCodeAt
> nodeValue
> for
> 0,0,0,0,0,0
> Math.min
> 
>
> I kid you not - this is their signature for an encrypted JS virus. I can't
> seem to remove a single character from any of these tokens without turning
> it from a dangerous virus to a harmless bit of JS.  Order doesn't seem to be
> important (although I haven't experimented with this that much).
>
> I think I'll be able to work around this by replacing any sequence of six
> zeros separated by commas with the sequence 0,0,0,[space]0,0,0.
>

Holy cow -- how do they think that is an acceptable measure?  Surely they
could at least change the warning to say "potentially dangerous JS" or
something rather than declaring it a virus.

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

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

Re: [gwt-contrib] Avira and HTML/CryptedGen (again)

2010-03-16 Thread Matt Mastracci
> I kid you not - this is their signature for an encrypted JS virus. I can't 
> seem to remove a single character from any of these tokens without turning it 
> from a dangerous virus to a harmless bit of JS.  Order doesn't seem to be 
> important (although I haven't experimented with this that much).
> 
> I think I'll be able to work around this by replacing any sequence of six 
> zeros separated by commas with the sequence 0,0,0,[space]0,0,0.
> 
> Holy cow -- how do they think that is an acceptable measure?  Surely they 
> could at least change the warning to say "potentially dangerous JS" or 
> something rather than declaring it a virus.

This is pretty unbelievable to me as well. I imagine that the process involved 
someone finding a mutating JS virus, found six strings that it always 
contained, put them in and figured that it was safe after surfing around for a 
bit without any false positives.

After experimenting a bit further, I discovered that "nodeValue" is actually 
matching case insensitively for "eval" (which makes a little more sense).  This 
means that the signature is something like "for eval .fromcharcode .charcodeat 
math.min 0,0,0,0,0,0"

This probably will likely affect a significant number GWT applications that use 
RPC. Avira seems to check files ending in .js* and .html* for this pattern.  I 
verified that the scanner intercepts these patterns in HTTP traffic and detects 
them in IE cache files.  There might be some negative patterns as well: Avira 
doesn't block my message in the Google Groups web interface, but it does block 
it when viewing the raw message source.

Matt.

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

[gwt-contrib] Re: One-line fix to SelectionScript's fallback logic for

2010-03-16 Thread spoon

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

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


[gwt-contrib] [google-web-toolkit] r7736 committed - Don't ever set the "base" variable to null. It is supposed to be the ...

2010-03-16 Thread codesite-noreply

Revision: 7736
Author: sp...@google.com
Date: Tue Mar 16 08:43:23 2010
Log: Don't ever set the "base" variable to null.  It is supposed to be the  
empty string

if it hasn't been set yet.

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

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

Modified:
 /trunk/dev/core/src/com/google/gwt/core/linker/IFrameTemplate.js
 /trunk/dev/core/src/com/google/gwt/core/linker/XSTemplate.js

===
--- /trunk/dev/core/src/com/google/gwt/core/linker/IFrameTemplate.js	Mon  
Mar  8 12:02:36 2010
+++ /trunk/dev/core/src/com/google/gwt/core/linker/IFrameTemplate.js	Tue  
Mar 16 08:43:23 2010

@@ -120,7 +120,8 @@
 ,markerId = "__gwt_marker___MODULE_NAME__"
 ,markerScript;

-if (base = metaProps['baseUrl']) {
+if (metaProps['baseUrl']) {
+  base = metaProps['baseUrl'];
   return;
 }

===
--- /trunk/dev/core/src/com/google/gwt/core/linker/XSTemplate.js	Mon Mar  8  
12:02:36 2010
+++ /trunk/dev/core/src/com/google/gwt/core/linker/XSTemplate.js	Tue Mar 16  
08:43:23 2010

@@ -104,7 +104,8 @@
 ,markerId = "__gwt_marker___MODULE_NAME__"
 ,markerScript;

-if (base = metaProps['baseUrl']) {
+if (metaProps['baseUrl']) {
+  base = metaProps['baseUrl'];
   return;
 }

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


[gwt-contrib] Re: Avira and HTML/CryptedGen (again)

2010-03-16 Thread Matt Mastracci
On Mar 16, 12:42 pm, Matt Mastracci  wrote:

> > Holy cow -- how do they think that is an acceptable measure?  Surely they 
> > could at least change the warning to say "potentially dangerous JS" or 
> > something rather than declaring it a virus.

> This probably will likely affect a significant number GWT applications that 
> use RPC. Avira seems to check files ending in .js* and .html* for this 
> pattern.  I verified that the scanner intercepts these patterns in HTTP 
> traffic and detects them in IE cache files.  There might be some negative 
> patterns as well: Avira doesn't block my message in the Google Groups web 
> interface, but it does block it when viewing the raw message source.

Even better: it turns out that if you put the string "google" anywhere
in the file matching CryptedGen, it no longer matches the heuristic. I
imagine that it would pick up the string from the class metadata for
those not using -XdisableClassMetadata.

So this is a virus:

"for eval .fromcharcode .charcodeat math.min 0,0,0,0,0,0"

And this is not:

"google for eval .fromcharcode .charcodeat math.min 0,0,0,0,0,0"

The easiest solution for us seems to be putting the string "Google Web
Toolkit" in a comment in our header.

Matt.

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


Re: [gwt-contrib] Support runAsync with the cross-site linker.

2010-03-16 Thread John Tamplin
On Tue, Mar 16, 2010 at 1:47 PM, Lex Spoon  wrote:

> Yes.  Indeed, this fix originally went into the iframe linker and it was
> overlooked for the cross-site linker.  Using more templating should help us
> not have to duplicate code so much.
>
> I was thinking in the short term to pull out computeScriptBase and
> processMetas into their own file.  Code that wants to pull it in could
> insert COMPUTE_SCRIPT_BASE or PROCESS_METAS at the place it should go.  As
> well, the code can then be tested more conveniently.
>
> Perhaps, though, we may as well define a general INCLUDE("processMetas.js")
> ?
>

I think everyone agrees that we need some sort of approach to reduce code
duplication here (and I think a similar problem exists in property providers
-- right now if I want to slightly extend a property provider I have to cut
and paste it).  I think there are differences on exactly how far we should
go, and since everybody has more than enough to do already nobody has
grabbed the horns.

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

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

[gwt-contrib] Update bikeshed/eclipse.README based on feedback from Dan

2010-03-16 Thread rjrjr

Reviewers: Dan Rice,

Description:
Update bikeshed/eclipse.README based on feedback from Dan
Review by: r...@google.com

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

Affected files:
  M bikeshed/eclipse.README


Index: bikeshed/eclipse.README
===
--- bikeshed/eclipse.README (revision 7736)
+++ bikeshed/eclipse.README (working copy)
@@ -1,24 +1,24 @@
-To make eclipse go:
+To create a Bikeshed project in Eclipse:

-* Set svn or git or whatever to exclude the following:
+* Set your source code control system (e.g., svn or git) to ignore
+the following files and directories. Eclipse needs to edit them,
+but they should not be submitted.

 .settings
 .classpath
 .project
-bin
-build
-classes
+bin/
+build/
+classes/
 com.google.gwt.*
-eclipse-trunk
-bikeshed/war/expenses
-bikeshed/war/stocks
-bikeshed/war/tree
+bikeshed/war/expenses/
+bikeshed/war/stocks/
+bikeshed/war/tree/

 * Install the Google Plugin for Eclipse
-* Import bikeshed as a new Java project with existing source
-* Bring up the project properties
-  * find the Google settings and turn on AppEngine and WebKit
+* Import trunk/bikeshed/ as a new Java project with existing source
+* Bring up the project properties
+  * find the Google settings and turn on AppEngine and Google Web Toolkit
   * Java Build Path > Libraries > Add Variable > GWT_TOOLS, Extend >  
redist/json/r2_20080312/json.jar

 * Copy tools/redist/json/r2_20080312/json.jar to bikeshed/war/WEB_INF/lib
 * Right click on the bikeshed project and choose Run as > Web Application.  
Choose from the various .html files

-


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


[gwt-contrib] [google-web-toolkit] r7737 committed - Adding a default return value to eventGetTypeInt....

2010-03-16 Thread codesite-noreply

Revision: 7737
Author: jlaba...@google.com
Date: Tue Mar 16 08:57:25 2010
Log: Adding a default return value to eventGetTypeInt.
http://gwt-code-reviews.appspot.com/222801

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

Modified:
 /trunk/user/src/com/google/gwt/user/client/DOM.java
 /trunk/user/src/com/google/gwt/user/client/Event.java
 /trunk/user/src/com/google/gwt/user/client/impl/DOMImpl.java
 /trunk/user/test/com/google/gwt/user/client/EventTest.java

===
--- /trunk/user/src/com/google/gwt/user/client/DOM.java	Fri Oct 16 14:48:33  
2009
+++ /trunk/user/src/com/google/gwt/user/client/DOM.java	Tue Mar 16 08:57:25  
2010

@@ -585,7 +585,7 @@
* Gets the enumerated type of this event (as defined in {...@link Event}).
*
* @param evt the event to be tested
-   * @return the event's enumerated type
+   * @return the event's enumerated type, or -1 if not defined
*/
   public static int eventGetType(Event evt) {
 return impl.eventGetTypeInt(evt);
===
--- /trunk/user/src/com/google/gwt/user/client/Event.java	Fri Sep 18  
10:54:47 2009
+++ /trunk/user/src/com/google/gwt/user/client/Event.java	Tue Mar 16  
08:57:25 2010

@@ -485,7 +485,7 @@
* Gets the enumerated type of this event given a valid event type name.
*
* @param typeName the typeName to be tested
-   * @return the event's enumerated type
+   * @return the event's enumerated type, or -1 if not defined
*/
   public static int getTypeInt(String typeName) {
 return DOM.impl.eventGetTypeInt(typeName);
===
--- /trunk/user/src/com/google/gwt/user/client/impl/DOMImpl.java	Tue Jul 21  
07:10:53 2009
+++ /trunk/user/src/com/google/gwt/user/client/impl/DOMImpl.java	Tue Mar 16  
08:57:25 2010

@@ -84,6 +84,7 @@
 case "DOMMouseScroll": return 0x2;
 case "contextmenu": return 0x4;
 case "paste": return 0x8;
+default: return -1;
 }
   }-*/;

===
--- /trunk/user/test/com/google/gwt/user/client/EventTest.java	Thu Feb 25  
06:57:14 2010
+++ /trunk/user/test/com/google/gwt/user/client/EventTest.java	Tue Mar 16  
08:57:25 2010

@@ -380,6 +380,24 @@
   public void testFireNativePreviewEventWithoutHandlers() {
 assertTrue(Event.fireNativePreviewEvent(null));
   }
+
+  public void testGetTypeInt() {
+assertEquals(Event.ONBLUR, Event.getTypeInt("blur"));
+assertEquals(Event.ONCHANGE, Event.getTypeInt("change"));
+assertEquals(Event.ONCLICK, Event.getTypeInt("click"));
+assertEquals(Event.ONERROR, Event.getTypeInt("error"));
+assertEquals(Event.ONFOCUS, Event.getTypeInt("focus"));
+assertEquals(Event.ONKEYDOWN, Event.getTypeInt("keydown"));
+assertEquals(Event.ONKEYPRESS, Event.getTypeInt("keypress"));
+assertEquals(Event.ONKEYUP, Event.getTypeInt("keyup"));
+assertEquals(Event.ONLOAD, Event.getTypeInt("load"));
+assertEquals(Event.ONMOUSEDOWN, Event.getTypeInt("mousedown"));
+assertEquals(Event.ONMOUSEMOVE, Event.getTypeInt("mousemove"));
+assertEquals(Event.ONMOUSEOUT, Event.getTypeInt("mouseout"));
+assertEquals(Event.ONMOUSEOVER, Event.getTypeInt("mouseover"));
+assertEquals(Event.ONMOUSEUP, Event.getTypeInt("mouseup"));
+assertEquals(-1, Event.getTypeInt("undefined"));
+  }

   /**
* Test that legacy EventPreview and NativePreviewHandlers can both  
cancel the


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


[gwt-contrib] Re: One-line fix to SelectionScript's fallback logic for

2010-03-16 Thread spoon

Here's a test case.  Can either of you review it?


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

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


Re: [gwt-contrib] Re: One-line fix to SelectionScript's fallback logic for

2010-03-16 Thread Miguel Méndez
Thanks Lex!

2010/3/12 Lex Spoon 

> 2010/3/11 Miguel Méndez 
>
> +1 to Ray's question.  I know that you were simply doing a fix Lex, but we
>> need to think about how we test these "features".
>>
>
> I agree.  I'll work out a test. -Lex
>
>  --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>



-- 
Miguel

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

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

2010-03-16 Thread codesite-noreply

Comment by d...@google.com:

/*-FALLBACK*/ should be written as /*-FALLBACK-*/ since that's what's  
actually implemented



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

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


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

2010-03-16 Thread codesite-noreply

Comment by d...@google.com:

{{{
/*-FALLBACK*/
}}}
should be written as
{{{
/*-FALLBACK-*/
}}}
since that's what's actually implemented



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

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


[gwt-contrib] Initial CL that sends an update across the wire and persists it.

2010-03-16 Thread amitmanjhi

Reviewers: Ray Ryan,

Description:
Initial CL that sends an update across the wire and persists it.


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

Affected files:
  M  
bikeshed/src/com/google/gwt/sample/expenses/gen/ExpenseRequestFactoryImpl.java
  M  
bikeshed/src/com/google/gwt/sample/expenses/server/ExpensesDataServlet.java

  M bikeshed/src/com/google/gwt/sample/expenses/server/domain/Employee.java
  M bikeshed/src/com/google/gwt/sample/expenses/server/domain/Report.java
  M bikeshed/src/com/google/gwt/sample/expenses/server/domain/Storage.java
  M bikeshed/src/com/google/gwt/valuestore/client/ValuesImpl.java
  M bikeshed/war/Expenses.html


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


[gwt-contrib] Re: DOMImpl#eventGetTypeInt returns NULL for unknown event types

2010-03-16 Thread jlabanca

committed as r7737

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

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


[gwt-contrib] Give a better error message when RunAsyncCode.runAsyncCode is passed something

2010-03-16 Thread spoon

Reviewers: cromwellian,

Description:
Give a better error message when RunAsyncCode.runAsyncCode is passed
something
other than a class literal.


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

Affected files:
  M dev/core/src/com/google/gwt/dev/jjs/impl/ReplaceRunAsyncs.java
  M dev/core/test/com/google/gwt/dev/jjs/JavaAstConstructor.java


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


[gwt-contrib] Re: Add build.xml file with checkstyle target; pass checkstyle

2010-03-16 Thread rjrjr

LGTM, presuming that you meant to include the symbols change in this
patch

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

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


[gwt-contrib] [google-web-toolkit] r7739 committed - Initial patch that sends an update across the wire and persists it....

2010-03-16 Thread codesite-noreply

Revision: 7739
Author: amitman...@google.com
Date: Tue Mar 16 10:02:10 2010
Log: Initial patch that sends an update across the wire and persists it.

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

Patch by: amitmanjhi
Review by: rjrjr

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

Modified:
 /trunk/bikeshed/src/com/google/gwt/valuestore/client/ValuesImpl.java
 /trunk/bikeshed/war/Expenses.html

===
--- /trunk/bikeshed/src/com/google/gwt/valuestore/client/ValuesImpl.java	 
Mon Mar 15 08:44:11 2010
+++ /trunk/bikeshed/src/com/google/gwt/valuestore/client/ValuesImpl.java	 
Tue Mar 16 10:02:10 2010

@@ -73,16 +73,17 @@
   }-*/;

   /**
-   * @return
+   * Return JSON representation using org.json library.
+   * @return returned string.
*/
   public native String toJson() /*-{
-var output = "";
-for (property in this) {
-  if (property != 'propertyHolder') {
-output += '"' + property + '": ' + '"' + this[property] + '"'  
+ '; ';

-  }
-}
-return output;
+var replacer = function(key, value) {
+  if (key == 'propertyHolder') {
+return;
+  }
+  return value;
+}
+return JSON.stringify(this, replacer);
   }-*/;

   private native Date dateForDouble(double millis) /*-{
===
--- /trunk/bikeshed/war/Expenses.html   Thu Mar  4 12:59:01 2010
+++ /trunk/bikeshed/war/Expenses.html   Tue Mar 16 10:02:10 2010
@@ -18,6 +18,7 @@
 
 Expenses
 src="expenses/expenses.nocache.js">
+src="json2.js">

   

   

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


[gwt-contrib] Re: Give a better error message when RunAsyncCode.runAsyncCode is passed something


LGTM.  Just be sure to add the test class that you had in
http://gwt-code-reviews.appspot.com/161802

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

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


[gwt-contrib] Re: Give a better error message when RunAsyncCode.runAsyncCode is passed something


Rietveld really wants to create a new issue rather than adding a patch
here.  I'm not sure why.  Anyway, the updated version of this patch is
here:

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


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

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


[gwt-contrib] Re: Update bikeshed/eclipse.README based on feedback from Dan

  What is 'com.google.gwt.*' in the file/dir list referring to?

Dan

On Tue, Mar 16, 2010 at 3:00 PM,  wrote:

> Reviewers: Dan Rice,
>
> Description:
> Update bikeshed/eclipse.README based on feedback from Dan
> Review by: r...@google.com
>
> Please review this at http://gwt-code-reviews.appspot.com/224801
>
> Affected files:
>  M bikeshed/eclipse.README
>
>
> Index: bikeshed/eclipse.README
> ===
> --- bikeshed/eclipse.README (revision 7736)
> +++ bikeshed/eclipse.README (working copy)
> @@ -1,24 +1,24 @@
> -To make eclipse go:
> +To create a Bikeshed project in Eclipse:
>
> -* Set svn or git or whatever to exclude the following:
> +* Set your source code control system (e.g., svn or git) to ignore
> +the following files and directories. Eclipse needs to edit them,
> +but they should not be submitted.
>
>  .settings
>  .classpath
>  .project
> -bin
> -build
> -classes
> +bin/
> +build/
> +classes/
>  com.google.gwt.*
> -eclipse-trunk
> -bikeshed/war/expenses
> -bikeshed/war/stocks
> -bikeshed/war/tree
> +bikeshed/war/expenses/
> +bikeshed/war/stocks/
> +bikeshed/war/tree/
>
>  * Install the Google Plugin for Eclipse
> -* Import bikeshed as a new Java project with existing source
> -* Bring up the project properties
> -  * find the Google settings and turn on AppEngine and WebKit
> +* Import trunk/bikeshed/ as a new Java project with existing source
> +* Bring up the project properties
> +  * find the Google settings and turn on AppEngine and Google Web Toolkit
>   * Java Build Path > Libraries > Add Variable > GWT_TOOLS, Extend >
> redist/json/r2_20080312/json.jar
>  * Copy tools/redist/json/r2_20080312/json.jar to bikeshed/war/WEB_INF/lib
>  * Right click on the bikeshed project and choose Run as > Web Application.
> Choose from the various .html files
> -
>
>
>

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

[gwt-contrib] Re: Add build.xml file with checkstyle target; pass checkstyle

  I did, checkstyle runs out of memory on the old version!

Dan

On Tue, Mar 16, 2010 at 4:13 PM,  wrote:

> LGTM, presuming that you meant to include the symbols change in this
> patch
>
>
> http://gwt-code-reviews.appspot.com/218801
>

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

[gwt-contrib] Re: Initial CL that sends an update across the wire and persists it.


LGTM

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

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


[gwt-contrib] Re: Update bikeshed/eclipse.README based on feedback from Dan


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

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


[gwt-contrib] Explain com.google.gwt.*


Reviewers: Dan Rice,

Description:
Update bikeshed/eclipse.README based on feedback from Dan
Review at http://gwt-code-reviews.appspot.com/224801

Review by: r...@google.com

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

Affected files:
  M bikeshed/eclipse.README


Index: bikeshed/eclipse.README
===
--- bikeshed/eclipse.README (revision 7736)
+++ bikeshed/eclipse.README (working copy)
@@ -1,24 +1,24 @@
-To make eclipse go:
+To create a Bikeshed project in Eclipse:

-* Set svn or git or whatever to exclude the following:
+* Set your source code control system (e.g., svn or git) to ignore
+the following files and directories. Eclipse needs to edit them,
+but they should not be submitted.

 .settings
 .classpath
 .project
-bin
-build
-classes
+bin/
+build/
+classes/
 com.google.gwt.*
-eclipse-trunk
-bikeshed/war/expenses
-bikeshed/war/stocks
-bikeshed/war/tree
+bikeshed/war/expenses/
+bikeshed/war/stocks/
+bikeshed/war/tree/

 * Install the Google Plugin for Eclipse
-* Import bikeshed as a new Java project with existing source
-* Bring up the project properties
-  * find the Google settings and turn on AppEngine and WebKit
+* Import trunk/bikeshed/ as a new Java project with existing source
+* Bring up the project properties
+  * find the Google settings and turn on AppEngine and Google Web Toolkit
   * Java Build Path > Libraries > Add Variable > GWT_TOOLS, Extend >  
redist/json/r2_20080312/json.jar

 * Copy tools/redist/json/r2_20080312/json.jar to bikeshed/war/WEB_INF/lib
 * Right click on the bikeshed project and choose Run as > Web Application.  
Choose from the various .html files

-


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


[gwt-contrib] Re: Update bikeshed/eclipse.README based on feedback from Dan


On 2010/03/16 19:00:38, Dan rice wrote:

   What is 'com.google.gwt.*' in the file/dir list referring to?


The gwtc output directories in war, e.g.
war/com.google.gwt.bikeshed.tree.Tree/

I'll add a comment to that effect.

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

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


[gwt-contrib] Give a better error message when RunAsyncCode.runAsyncCode is passed something


Reviewers: cromwellian,

Description:
Give a better error message when RunAsyncCode.runAsyncCode is passed
something
other than a class literal.

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


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

Affected files:
  M dev/core/src/com/google/gwt/dev/jjs/impl/ReplaceRunAsyncs.java
  M dev/core/test/com/google/gwt/dev/jjs/JavaAstConstructor.java


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


[gwt-contrib] Re: Explain com.google.gwt.*


Sorry, meant to be an update to the other issue. Please ignore.

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

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


[gwt-contrib] Re: Give a better error message when RunAsyncCode.runAsyncCode is passed something


Trying again:

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


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

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


[gwt-contrib] Give a better error message when RunAsyncCode.runAsyncCode is passed something


Reviewers: cromwellian,

Description:
Give a better error message when RunAsyncCode.runAsyncCode is passed
something
other than a class literal.

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


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

Affected files:
  M dev/core/src/com/google/gwt/dev/jjs/impl/ReplaceRunAsyncs.java
  A  
dev/core/test/com/google/gwt/dev/jjs/impl/ReplaceRunAsyncsErrorMessagesTest.java



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


[gwt-contrib] Re: Give a better error message when RunAsyncCode.runAsyncCode is passed something



LGTM. I like the UnitTestTreeLogger, didn't even know it existed.



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

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


[gwt-contrib] additional predefined DateTimeFormat patterns

DateTimeFormat now defines 4 date formats, 4 time formats, and 4 combined
date/time formats (plus the ability to supply your own pattern, but then you
are responsible for localizing it yourself).  These formats don't cover all
the possible use cases, such as a month/day or month/year format, or even
more flexibility within some of the formats.

CLDR now defines additional formats (you can see some of them
here,
look under available_date_formats) which mostly address these limitations.
 There is a question about how to add them however.

The current approach has a static method for each of the default formats,
and continuing that trend would be painful, so I think we need to switch to
something like

DateTimeFormat formatter =
DateTimeFormat.getPredefinedFormat(Format.FullDate)

Another point of contention is what to do with the existing
DateTimeConstants interface, which provides the constants used by
DateTimeFormat to actually do the formatting.  There are a few warts on it
left over from when it was first created:

   - firstDayOfTheWeek() returns a string instead of an integer, so that
   means you have to parse the string at runtime and wouldn't detect an error
   until then, rather than doing it at compile time and detecting it then --
   this also costs code size
   - likewise for weekendRange() -- it returns strings rather than integers
   with the problems listed above, and there really is no value to it being an
   array as you would never lookup by an index
   - there is no mechanism for describing how the date/time formats should
   be assembled together (currently we just assume the date goes first,
   followed by a single space, followed by the time, but that isn't correct in
   many locales)
   - date.time formats are split into separate arrays, and any existing
   implementations are only going to supply 4 patterns for each

If we try and use the existing interface with no changes (to avoid making a
breaking change), we can't fix these limitations.  We could have each new
format specify whether it was primarily a date or a time format and put it
in the proper list (what happens when a combined format is added?), though
it makes the lookup code a bit more complicated  Existing implementations
will only define 4 values of each, so that means the new formats would have
to be emulated in some manner on top of them, and that emulation code would
wind up being pulled into every client since this couldn't be known until
runtime (the emulation code could be simple if we were willing to substitute
one of the existing unmodified patterns, but then imaging getting even the
short date in a calendar's day cell because the "d" format isn't defined.

To me, it seems like it is worthwhile to go ahead and fix these limitations
and make breaking changes to some apps.  Those apps that would need changing
will largely fall into two categories:

   1. mock testing code that supplies a DateTimesConstant implementation
   We should do like we did for CurrencyData and provide a default
   implementation for such purposes, so in the future we can update it when the
   interface is changed.
   2. code that consumes DateTimeConstants, typically to work around the
   limited formats or for special needs such as DatePicker
   In this case, I think those applications are likely to need changing
   anyway to take advantage of the new features and so it shouldn't be a big
   deal to break them,

Finally, the changes are trivial so the effort required to adapt to the
changes won't be an issue.  The only real problem is that of a library
wanting to support consecutive versions of GWT, but we seem to have enough
changes that make that a problem already.

So what do you think?  Should we go out of our way to avoid a breaking
change here, even if it means living with some limitations, or should we do
it the way it should be done even if that means some code will have to be
updated?

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

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

[gwt-contrib] deRPC experiences

I took the plunge and started moving our codebase over to deRPC.  It's pretty 
simple to get bootstrapped, though there's some deployment work we needed to do 
to ensure that our .gwt.rpc files are made available to the backends.

I'm storing our history of .gwt.rpc files in S3, since we're already pushing 
files like this into S3 during our deployment. It was trivial to hook up the 
findClientOracleData to work with the existing process (though we're currently 
gzipping the already-gzipped policy files):

@Override
protected InputStream findClientOracleData(String requestModuleBasePath, String 
permutationStrongName) throws SerializationException {
try {
return new GZIPInputStream(
new URL("http://s3-bucket-name.amazonaws.com/"; 
+ permutationStrongName + ".gwt.rpc.gz").openStream());
} catch (MalformedURLException e) {
throw new SerializationException(e);
} catch (IOException e) {
throw new SerializationException(e);
}
}

I ran into a few small issues while developing this:

 - NPE in the WebModeClientOracle.readStreamAsObject finally block if 
objectInputStream can't be created (ie: if the format is invalid)
 - If the GWT module base path URL isn't absolute, getRequestModuleBasePath 
fails. We use relative base paths to simplify our hosted mode development.
 - WebModePayloadSink seems to throw an NPE when push a null constructorIdent. 
I'm still digging into this, but it might be related to the fact that we're 
sending enums with enum value methods across the wire:

String constructorIdent = clientOracle.getMethodId(x.getTargetClass(),
constructorMethodName, x.getTargetClass());
assert constructorIdent != null : "constructorIdent "
+ constructorMethodName;

// constructor(new Seed),
push(constructorIdent);

 
RpcServlet is much nicer to work with that RemoveServiceServlet, kudos. It 
would be nice if the service object (passed into decodeRequest and 
invokeAndStreamResponse) were retrieved via a protected method, rather than 
assumed to be 'this'. We wire the service object into the servlet at 
configuration time via Spring, so I had to duplicate the contents of 
processCall.

Overall we saw a small decrease in the initial code fragment (~5%). I didn't 
notice any particular slowness while testing.

Matt.

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


[gwt-contrib] Re: Update bikeshed/eclipse.README based on feedback from Dan


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

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


[gwt-contrib] Re: Update bikeshed/eclipse.README based on feedback from Dan


Can you look again? I've made a few updates.

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

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


[gwt-contrib] Re: Unicode support for Character.is* methods


A few issues:

- the way this is divided, all of the code will get pulled into every
app that calls any of these methods.
- this is incomplete and doesn't have the other properties, such as
getDirection, toLower, etc.

I had written a full implementation a while ago (it is still available
in svn at changes/jat/ucd), which encoded each table separately with a
combination of run-length encoding and huffman coding the runs, which
got the size of individual tables down to a few hundred bytes each, and
you only paid for the tables that were used.  The decompression code was
of course larger, so maybe there is room for a simpler encoding
mechanism that takes less code even if the data is larger.

That effort was complete but was never merged in because some people
objected to the code size increase.  Given the synchronous nature of the
API, it isn't feasible to fetch the tables on-demand from a server, so
they have to be downloaded with the code (they can go into different
runAsync fragments though).

I hope to work on that and other i18n issues next quarter, but I am not
sure how much time I will have to work on it.


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

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


[gwt-contrib] GWT-Query - needs forking?

Hi all,

Not sure how to get a hold of the person responsible for GWT-Query,
which was spoken of in terms of including it in GWT itself. This is my
last ditch attempt - the project appears to have died in May, and I'd
like to get committer access to the project.

Ta!
Richard

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


Re: [gwt-contrib] GWT-Query - needs forking?

Hi Richard,

You do mean Ray Cromwell ? hes quite active here and should see your
message.
hth

mP

On Wed, Mar 17, 2010 at 2:18 PM, Richard Vowles wrote:

> Hi all,
>
> Not sure how to get a hold of the person responsible for GWT-Query,
> which was spoken of in terms of including it in GWT itself. This is my
> last ditch attempt - the project appears to have died in May, and I'd
> like to get committer access to the project.
>
> Ta!
> Richard
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors




-- 
mP

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