Re: [gwt-contrib] Re: Pruner runs only once. (issue1436802)

2011-05-13 Thread Ray Cromwell
Sorry for the delay, spent most of today catching up after I/O, I will
take care of these Friday.


On Tue, May 10, 2011 at 6:44 PM,  sco...@google.com wrote:
 This is ready for review now.

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

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


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


[gwt-contrib] Re: Allows enum ordinalization to proceed for enums with static methods/fields (issue1428808)

2011-05-13 Thread jbrosenberg

It looks like I had some unpublished comments in this review, so just
sending them out now.


http://gwt-code-reviews.appspot.com/1428808/diff/1/dev/core/test/com/google/gwt/dev/jjs/impl/EnumOrdinalizerTest.java
File dev/core/test/com/google/gwt/dev/jjs/impl/EnumOrdinalizerTest.java
(right):

http://gwt-code-reviews.appspot.com/1428808/diff/1/dev/core/test/com/google/gwt/dev/jjs/impl/EnumOrdinalizerTest.java#newcode273
dev/core/test/com/google/gwt/dev/jjs/impl/EnumOrdinalizerTest.java:273:
String y = fruit.staticField;);
Interesting, yeah the side-effects of evaluation of fruit would be the
other case where it differs from Fruit.staticMethod() (along with the
null case).  So isn't it incorrect to not check for the NPE in that
case?  Also, after more optimizations happen and the 'fruit' reference
goes away, would not that open up the possibility for enum
ordinalization at that point, on a subsequent pass?

I've also been planning another opportunity for ordinalization for the
case where enums are assigned or compared to null, by representing this
as -1.  This would only be possible in cases where it's directly clear
that the cast is to null and not an evaluated expression that might be
null, etc.  But that possibility would probably not be compatible with
allowing fruit.staticMethod to be ordinalized, if fruit is determined to
be null and ordinalized to -1, etc., unless we want to synthetically
create the code to throw the NPE (but maybe we don't care about the NPE
possibility anyway?)

http://gwt-code-reviews.appspot.com/1428808/diff/1/dev/core/test/com/google/gwt/dev/jjs/impl/EnumOrdinalizerTest.java#newcode456
dev/core/test/com/google/gwt/dev/jjs/impl/EnumOrdinalizerTest.java:456:
});
Yeah, actually the ordinalization can proceed in this case, and the
ordinalization process doesn't seem to actually need to change the AST
for the instanceof test itself.  I'll make a note to test this scenario
fully and enable subsequently.  Adding a TODO.

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

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


[gwt-contrib] Re: Decentralize nullmethod/nullfield (issue1442802)

2011-05-13 Thread jbrosenberg


http://gwt-code-reviews.appspot.com/1442802/diff/1/dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java
File dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java
(right):

http://gwt-code-reviews.appspot.com/1442802/diff/1/dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java#newcode251
dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java:251: assert
ident.startsWith(@null::);
Why is it necessary now to process null methods/null fields?  Can't they
safely ignored as was done previously?

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

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


[gwt-contrib] Re: Pruner runs only once. (issue1436802)

2011-05-13 Thread jbrosenberg

Can you clarify what you mean by Pruner runs only once?  It looks like
it will still be invoked multiple times by the optimizeLoop, etc.  Can
you provide some background on the jitter phenomena?

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

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


[gwt-contrib] Re: Pruner runs only once. (issue1436802)

2011-05-13 Thread Eric Ayers
Some background - some optimizers run themselves in a loop on each
pass of the optimizer.  During some performance investigations last
year, we tried to get some of these extra loops out, but Pruner was a
tough nut to crack.  The nasty thing about this looping behavior is
that the last pass through is always wasted (you know to exit the loop
when the optimizer doesn't change the tree.)

I've been reading the code and talking to Scott about it.  The loop
being removed is the while() loop in execImpl().  The jitter is the
fact that the ControlFlowAnalyzer might return one result for liveness
before the Pruner runs, and a different result after Pruner runs.  If
you don't loop inside of Pruner, then the entire optimization pass may
have to run extra times.

On Fri, May 13, 2011 at 11:03 AM,  jbrosenb...@google.com wrote:
 Can you clarify what you mean by Pruner runs only once?  It looks like
 it will still be invoked multiple times by the optimizeLoop, etc.  Can
 you provide some background on the jitter phenomena?

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




-- 
Eric Z. Ayers
Google Web Toolkit, Atlanta, GA USA

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


[gwt-contrib] Re: Allows enum ordinalization to proceed for enums with static methods/fields (issue1428808)

2011-05-13 Thread scottb


http://gwt-code-reviews.appspot.com/1428808/diff/1/dev/core/test/com/google/gwt/dev/jjs/impl/EnumOrdinalizerTest.java
File dev/core/test/com/google/gwt/dev/jjs/impl/EnumOrdinalizerTest.java
(right):

http://gwt-code-reviews.appspot.com/1428808/diff/1/dev/core/test/com/google/gwt/dev/jjs/impl/EnumOrdinalizerTest.java#newcode273
dev/core/test/com/google/gwt/dev/jjs/impl/EnumOrdinalizerTest.java:273:
String y = fruit.staticField;);
I *think*, and you probably want to check me, that we simply don't care
about the NPE when you have a null qualifier on a static method.  You're
right that if we did, it would turn off that optimization.  I like your
-1 idea, btw. :)

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

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


[gwt-contrib] Re: Enables on the persistent unit cache by default. (issue1448801)

2011-05-13 Thread jbrosenberg


http://gwt-code-reviews.appspot.com/1448801/diff/1/dev/core/src/com/google/gwt/dev/javac/UnitCacheFactory.java
File dev/core/src/com/google/gwt/dev/javac/UnitCacheFactory.java
(right):

http://gwt-code-reviews.appspot.com/1448801/diff/1/dev/core/src/com/google/gwt/dev/javac/UnitCacheFactory.java#newcode53
dev/core/src/com/google/gwt/dev/javac/UnitCacheFactory.java:53: } else
if (cacheDir == null) {
Shouldn't we offer a useful default for the cacheDir, such as the
java.io.tmpdir property, so that users will be able to take advantage of
caching out of the box, without having to take special effort.

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

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


[gwt-contrib] Re: Decentralize nullmethod/nullfield (issue1442802)

2011-05-13 Thread scottb


http://gwt-code-reviews.appspot.com/1442802/diff/1/dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java
File dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java
(right):

http://gwt-code-reviews.appspot.com/1442802/diff/1/dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java#newcode251
dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java:251: assert
ident.startsWith(@null::);
They were never ignored.  Sorry for how subtle this is, I had to dig
myself to refresh.  If you go look at JsniRefLookup.findJsniRefTarget(),
you'll see that nullMethod/nullField are explicitly handled there.
GenerateJavaAST uses JsniRefLookup, so that's how it handles refs to
nullMethod/nullField.

But GwtAstBuilder doesn't use JsniRefLookup (it doesn't have a
JProgram), instead it relies on data extracted from JsniChecker, which
does a lot of the same things as JsniRefLookup.  My Remove
JProgram.jsniMap in favor of local accounting. change essentially broke
null:: refs here (not that it matters, because this code isn't live
yet).  So I needed to add them back, but since I don't have a JProgram
here, I needed to turn the null method and field into singleton objects
so I can access them.

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

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


[gwt-contrib] Re: Enables on the persistent unit cache by default. (issue1448801)

2011-05-13 Thread zundel


http://gwt-code-reviews.appspot.com/1448801/diff/1/dev/core/src/com/google/gwt/dev/javac/UnitCacheFactory.java
File dev/core/src/com/google/gwt/dev/javac/UnitCacheFactory.java
(right):

http://gwt-code-reviews.appspot.com/1448801/diff/1/dev/core/src/com/google/gwt/dev/javac/UnitCacheFactory.java#newcode53
dev/core/src/com/google/gwt/dev/javac/UnitCacheFactory.java:53: } else
if (cacheDir == null) {
On 2011/05/13 17:20:35, jbrosenberg wrote:

Shouldn't we offer a useful default for the cacheDir, such as the

java.io.tmpdir

property, so that users will be able to take advantage of caching out

of the

box, without having to take special effort.


We do offer a sane default, but its hard to offer one here.  The
different entry points GWTShell, DevMode and Compiler offer defaults
based on other settings.

For DevMode and Compiler, it puts it under war/WEB-INF/gwt-unitCache

For GWTShell it puts it under .gwt-tmp/gwt-unitCache

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

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


[gwt-contrib] Re: Attachable elements in UiBinder: always run logicalAdd(Attachable) for Attachable widgets. (issue1446801)

2011-05-13 Thread rjrjr

LGTM

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

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


[gwt-contrib] Re: Decentralize nullmethod/nullfield (issue1442802)

2011-05-13 Thread jbrosenberg

LGTM

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

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


[gwt-contrib] Re: Enables on the persistent unit cache by default. (issue1448801)

2011-05-13 Thread jbrosenberg

LGTM

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

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


[gwt-contrib] [google-web-toolkit] r10182 committed - Attachable elements in UiBinder: always run logicalAdd(Attachable) for...

2011-05-13 Thread codesite-noreply

Revision: 10182
Author:   jul...@google.com
Date: Fri May 13 08:01:50 2011
Log:  Attachable elements in UiBinder: always run  
logicalAdd(Attachable) for

Attachable widgets.

Before this patch, if we declared a gwt:Attachable/ in the UiBinder  
template
and a corresponding @UiField(provided=true) field in the Java class, no  
event

handlers were attached to the widget.

This happened because of a check in UiBinder's AttachableInterpreter. It  
invoked

logicalAdd only if the field derived from IsWidget, which is not the case of
Attachable. As we were declaring it only as an Attachable, it did not run
logicalAdd over it, so the event handlers were not installed.

logicalAdd(Attachable) does all type checks necessary. This patch makes  
UiBinder always produce code to logicalAdd(Attachable) the widget declared  
as gwt:Attachable/ in the template, which causes the event handlers to  
get attached correctly.


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

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

Modified:
  
/trunk/user/src/com/google/gwt/uibinder/elementparsers/AttachableInterpreter.java


===
---  
/trunk/user/src/com/google/gwt/uibinder/elementparsers/AttachableInterpreter.java	 
Thu Apr 28 08:49:13 2011
+++  
/trunk/user/src/com/google/gwt/uibinder/elementparsers/AttachableInterpreter.java	 
Fri May 13 08:01:50 2011

@@ -67,14 +67,10 @@
 %s.performDetachedInitialization();,
 fieldManager.convertFieldToGetter(childFieldWriter.getName()));

-// If this particular Attachable is a Widget, it needs to be added to  
the

-// HTMLPanel.
-if (uiWriter.isWidgetElement(elem)) {
-  fieldWriter.addDetachStatement(
-  %s.logicalAdd(%s);,
-  fieldManager.convertFieldToGetter(fieldName),
-  fieldManager.convertFieldToGetter(childFieldWriter.getName()));
-}
+fieldWriter.addDetachStatement(
+%s.logicalAdd(%s);,
+fieldManager.convertFieldToGetter(fieldName),
+fieldManager.convertFieldToGetter(childFieldWriter.getName()));

 // TODO(rdcastro): use the render() call that receives the  
SafeHtmlBuilder
 String elementHtml =  
fieldManager.convertFieldToGetter(childFieldWriter.getName()) + .render(


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


[gwt-contrib] Re: Pruner runs only once. (issue1436802)

2011-05-13 Thread Scott Blum
On Fri, May 13, 2011 at 11:15 AM, Eric Ayers zun...@google.com wrote:

 I've been reading the code and talking to Scott about it.  The loop
 being removed is the while() loop in execImpl().  The jitter is the
 fact that the ControlFlowAnalyzer might return one result for liveness
 before the Pruner runs, and a different result after Pruner runs.  If
 you don't loop inside of Pruner, then the entire optimization pass may
 have to run extra times.


Great explanation!

The last time we tried to naively remove the while loop from Pruner, the
outer optimization loop went from ~7 passes to ~10 passes for Showcase, and
the total optimization time went up.

You can think of my patch as converging faster.  With my patch in and the
Pruner loop gone, you still only get ~7 outer optimization loops, and the
total optimization time goes down.

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

[gwt-contrib] [google-web-toolkit] r10183 committed - Decentralize nullmethod/nullfield....

2011-05-13 Thread codesite-noreply

Revision: 10183
Author:   sco...@google.com
Date: Fri May 13 08:44:36 2011
Log:  Decentralize nullmethod/nullfield.

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

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

Modified:
 /trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JField.java
 /trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JMethod.java
 /trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java
 /trunk/dev/core/src/com/google/gwt/dev/jjs/ast/js/JsniClassLiteral.java
 /trunk/dev/core/src/com/google/gwt/dev/jjs/ast/js/JsniFieldRef.java
 /trunk/dev/core/src/com/google/gwt/dev/jjs/ast/js/JsniMethodRef.java
 /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java
  
/trunk/dev/core/src/com/google/gwt/dev/jjs/impl/ImplementClassLiteralsAsFields.java


===
--- /trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JField.java	Tue Apr 19  
10:10:18 2011
+++ /trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JField.java	Fri May 13  
08:44:36 2011

@@ -67,6 +67,17 @@
 }
   }

+  private static class ExternalSerializedNullField implements Serializable  
{
+public static final ExternalSerializedNullField INSTANCE = new  
ExternalSerializedNullField();

+
+private Object readResolve() {
+  return NULL_FIELD;
+}
+  }
+
+  public static final JField NULL_FIELD = new  
JField(SourceOrigin.UNKNOWN, nullField, null,

+  JNullType.INSTANCE, false, Disposition.FINAL);
+
   private final JDeclaredType enclosingType;
   private final boolean isCompileTimeConstant;
   private final boolean isStatic;
@@ -153,6 +164,8 @@
   protected Object writeReplace() {
 if (enclosingType != null  enclosingType.isExternal()) {
   return new ExternalSerializedForm(this);
+} else if (this == NULL_FIELD) {
+  return ExternalSerializedNullField.INSTANCE;
 } else {
   return this;
 }
===
--- /trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JMethod.java	Thu May  5  
06:03:58 2011
+++ /trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JMethod.java	Fri May 13  
08:44:36 2011

@@ -55,8 +55,24 @@
 }
   }

+  private static class ExternalSerializedNullMethod implements  
Serializable {
+public static final ExternalSerializedNullMethod INSTANCE = new  
ExternalSerializedNullMethod();

+
+private Object readResolve() {
+  return NULL_METHOD;
+}
+  }
+
+  public static final JMethod NULL_METHOD = new  
JMethod(SourceOrigin.UNKNOWN, nullMethod, null,

+  JNullType.INSTANCE, false, false, true, false);
+
   private static final String TRACE_METHOD_WILDCARD = *;

+  static {
+NULL_METHOD.setSynthetic();
+NULL_METHOD.freezeParamTypes();
+  }
+
   private static void trace(String title, String code) {
 System.out.println(---);
 System.out.println(title + :);
@@ -352,6 +368,8 @@
   protected Object writeReplace() {
 if (enclosingType != null  enclosingType.isExternal()) {
   return new ExternalSerializedForm(this);
+} else if (this == NULL_METHOD) {
+  return ExternalSerializedNullMethod.INSTANCE;
 } else {
   return this;
 }
===
--- /trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java	Tue May 10  
05:59:20 2011
+++ /trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java	Fri May 13  
08:44:36 2011

@@ -335,10 +335,6 @@

   private final MapJMethod, JMethod instanceToStaticMap = new  
IdentityHashMapJMethod, JMethod();


-  private JField nullField;
-
-  private JMethod nullMethod;
-
   private MapJReferenceType, Integer queryIds;

   /**
@@ -855,22 +851,11 @@
   }

   public JField getNullField() {
-if (nullField == null) {
-  nullField =
-  new  
JField(createSourceInfoSynthetic(JProgram.class), nullField, null,

-  JNullType.INSTANCE, false, Disposition.FINAL);
-}
-return nullField;
+return JField.NULL_FIELD;
   }

   public JMethod getNullMethod() {
-if (nullMethod == null) {
-  nullMethod =
-  new  
JMethod(createSourceInfoSynthetic(JProgram.class), nullMethod, null,

-  JNullType.INSTANCE, false, false, true, false);
-  nullMethod.setSynthetic();
-}
-return nullMethod;
+return JMethod.NULL_METHOD;
   }

   public int getQueryId(JReferenceType elementType) {
===
--- /trunk/dev/core/src/com/google/gwt/dev/jjs/ast/js/JsniClassLiteral.java	 
Tue May 10 05:59:20 2011
+++ /trunk/dev/core/src/com/google/gwt/dev/jjs/ast/js/JsniClassLiteral.java	 
Fri May 13 08:44:36 2011

@@ -28,6 +28,7 @@

   public JsniClassLiteral(SourceInfo info, String ident, JType type) {
 super(info, type);
+assert ident != null;
 this.ident = ident;
   }

===
--- /trunk/dev/core/src/com/google/gwt/dev/jjs/ast/js/JsniFieldRef.java	Tue  
Apr 19 10:10:18 2011
+++ 

[gwt-contrib] Re: Enables on the persistent unit cache by default. (issue1448801)

2011-05-13 Thread tobyr

LGTM

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

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


[gwt-contrib] Re: SafeHtmlRenderer code gen for UiBinder. Picking up issue 1426803 (issue1442804)

2011-05-13 Thread rchandia

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

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


[gwt-contrib] Re: SafeHtmlRenderer code gen for UiBinder. Picking up issue 1426803 (issue1442804)

2011-05-13 Thread rchandia

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

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


[gwt-contrib] Re: SafeHtmlRenderer code gen for UiBinder. Picking up issue 1426803 (issue1442804)

2011-05-13 Thread rchandia

PTAL. Smoke tests pass.

On 2011/05/13 19:16:42, rchandia wrote:



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

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


[gwt-contrib] Fix various warnings. (issue1446804)

2011-05-13 Thread rjrjr

Reviewers: rice,

Description:
Fix various warnings.


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

Affected files:
  M  
samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/activity/TaskListActivity.java
  M  
samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/desktop/DesktopTaskReadView.java
  M  
samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/mobile/MobileTaskReadView.java



Index:  
samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/activity/TaskListActivity.java

===
---  
samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/activity/TaskListActivity.java	 
(revision 10181)
+++  
samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/activity/TaskListActivity.java	 
(working copy)

@@ -25,7 +25,6 @@
 import com.google.gwt.sample.mobilewebapp.client.place.TaskEditPlace;
 import com.google.gwt.sample.mobilewebapp.client.place.TaskListPlace;
 import com.google.gwt.sample.mobilewebapp.shared.TaskProxy;
-import com.google.gwt.storage.client.Storage;
 import com.google.gwt.user.client.Timer;
 import com.google.gwt.user.client.ui.AcceptsOneWidget;
 import com.google.web.bindery.requestfactory.shared.Receiver;
@@ -107,8 +106,6 @@
 }
   };

-  private final Storage storage;
-
   /**
* A boolean indicating that we should clear the task list when started.
*/
@@ -141,7 +138,6 @@
   public TaskListActivity(ClientFactory clientFactory, boolean  
clearTaskList) {

 this.clientFactory = clientFactory;
 this.clearTaskList = clearTaskList;
-this.storage = clientFactory.getLocalStorageIfSupported();
   }

   public ClickHandler getAddButtonHandler() {
Index:  
samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/desktop/DesktopTaskReadView.java

===
---  
samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/desktop/DesktopTaskReadView.java	 
(revision 10181)
+++  
samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/desktop/DesktopTaskReadView.java	 
(working copy)

@@ -20,7 +20,6 @@
 import com.google.gwt.event.dom.client.ClickEvent;
 import com.google.gwt.event.dom.client.ClickHandler;
 import com.google.gwt.sample.mobilewebapp.client.activity.TaskReadView;
-import com.google.gwt.sample.mobilewebapp.client.ui.DateButton;
 import com.google.gwt.sample.mobilewebapp.shared.TaskProxy;
 import com.google.gwt.uibinder.client.UiBinder;
 import com.google.gwt.uibinder.client.UiField;
@@ -30,7 +29,6 @@
 import com.google.gwt.user.client.ui.DockLayoutPanel;
 import com.google.gwt.user.client.ui.HTMLPanel;
 import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.TextBoxBase;
 import com.google.gwt.user.client.ui.Widget;

 /**
Index:  
samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/mobile/MobileTaskReadView.java

===
---  
samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/mobile/MobileTaskReadView.java	 
(revision 10181)
+++  
samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/mobile/MobileTaskReadView.java	 
(working copy)

@@ -26,10 +26,8 @@
 import com.google.gwt.user.client.ui.Composite;
 import com.google.gwt.user.client.ui.DateLabel;
 import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.TextBoxBase;
 import com.google.gwt.user.client.ui.Widget;
 import com.google.gwt.widget.client.TextButton;
-import  
com.google.web.bindery.requestfactory.gwt.client.RequestFactoryEditorDriver;


 /**
  * View used to edit a task.


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


[gwt-contrib] Re: Fix various warnings. (issue1446804)

2011-05-13 Thread rice

LGTM

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

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


[gwt-contrib] Re: Fix various warnings. (issue1446804)

2011-05-13 Thread rjrjr

nevermind

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

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


[gwt-contrib] Re: Fix various warnings. (issue1446804)

2011-05-13 Thread rjrjr

No, do mind. LGTM accepted, thankee

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

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


[gwt-contrib] This change works around a problem found in GWT Designer testing. (issue1446805)

2011-05-13 Thread zundel

Reviewers: scheglov, scottb,

Description:
This change works around a problem found in GWT Designer testing.

The compilation unit rescue was really only intended for old cached
compilation units, not files that change after you first start running
the process.


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

Affected files:
  M dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java


Index: dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java
===
--- dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java	 
(revision 10183)
+++ dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java	 
(working copy)

@@ -394,17 +394,19 @@
   new ResourceCompilationUnitBuilder(typeName, resource);

   CompilationUnit cachedUnit = unitCache.find(resource.getPathPrefix()  
+ resource.getPath());

+
+  // Try to rescue cached units from previous sessions where a jar has  
been

+  // recompiled.
   if (cachedUnit != null  cachedUnit.getLastModified() !=  
resource.getLastModified()) {

 unitCache.remove(cachedUnit);
-if (!cachedUnit.getContentId().equals(builder.getContentId())) {
+if (cachedUnit instanceof CachedCompilationUnit 
+cachedUnit.getContentId().equals(builder.getContentId())) {
+  CachedCompilationUnit updatedUnit =
+  new CachedCompilationUnit((CachedCompilationUnit)  
cachedUnit, resource

+  .getLastModified(), resource.getLocation());
+  unitCache.add(updatedUnit);
+} else {
   cachedUnit = null;
-} else {
-  // Update the cache. The location might have changed since last  
build

-  // (e.g. jar to file)
-  CachedCompilationUnit updatedUnit =
-  new  
CachedCompilationUnit(cachedUnit.asCachedCompilationUnit(),

-  resource.getLastModified(), resource.getLocation());
-  unitCache.add(updatedUnit);
 }
   }
   if (cachedUnit != null) {


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


[gwt-contrib] [google-web-toolkit] r10184 committed - Fix various warnings....

2011-05-13 Thread codesite-noreply

Revision: 10184
Author:   gwt.mirror...@gmail.com
Date: Fri May 13 14:17:46 2011
Log:  Fix various warnings.

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

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

Modified:
  
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/activity/TaskListActivity.java
  
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/desktop/DesktopTaskReadView.java
  
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/mobile/MobileTaskReadView.java


===
---  
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/activity/TaskListActivity.java	 
Tue May 10 20:04:34 2011
+++  
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/activity/TaskListActivity.java	 
Fri May 13 14:17:46 2011

@@ -25,7 +25,6 @@
 import com.google.gwt.sample.mobilewebapp.client.place.TaskEditPlace;
 import com.google.gwt.sample.mobilewebapp.client.place.TaskListPlace;
 import com.google.gwt.sample.mobilewebapp.shared.TaskProxy;
-import com.google.gwt.storage.client.Storage;
 import com.google.gwt.user.client.Timer;
 import com.google.gwt.user.client.ui.AcceptsOneWidget;
 import com.google.web.bindery.requestfactory.shared.Receiver;
@@ -107,8 +106,6 @@
 }
   };

-  private final Storage storage;
-
   /**
* A boolean indicating that we should clear the task list when started.
*/
@@ -141,7 +138,6 @@
   public TaskListActivity(ClientFactory clientFactory, boolean  
clearTaskList) {

 this.clientFactory = clientFactory;
 this.clearTaskList = clearTaskList;
-this.storage = clientFactory.getLocalStorageIfSupported();
   }

   public ClickHandler getAddButtonHandler() {
===
---  
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/desktop/DesktopTaskReadView.java	 
Mon May  9 10:25:15 2011
+++  
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/desktop/DesktopTaskReadView.java	 
Fri May 13 14:17:46 2011

@@ -20,7 +20,6 @@
 import com.google.gwt.event.dom.client.ClickEvent;
 import com.google.gwt.event.dom.client.ClickHandler;
 import com.google.gwt.sample.mobilewebapp.client.activity.TaskReadView;
-import com.google.gwt.sample.mobilewebapp.client.ui.DateButton;
 import com.google.gwt.sample.mobilewebapp.shared.TaskProxy;
 import com.google.gwt.uibinder.client.UiBinder;
 import com.google.gwt.uibinder.client.UiField;
@@ -30,7 +29,6 @@
 import com.google.gwt.user.client.ui.DockLayoutPanel;
 import com.google.gwt.user.client.ui.HTMLPanel;
 import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.TextBoxBase;
 import com.google.gwt.user.client.ui.Widget;

 /**
===
---  
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/mobile/MobileTaskReadView.java	 
Mon May  9 10:25:15 2011
+++  
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/mobile/MobileTaskReadView.java	 
Fri May 13 14:17:46 2011

@@ -26,10 +26,8 @@
 import com.google.gwt.user.client.ui.Composite;
 import com.google.gwt.user.client.ui.DateLabel;
 import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.TextBoxBase;
 import com.google.gwt.user.client.ui.Widget;
 import com.google.gwt.widget.client.TextButton;
-import  
com.google.web.bindery.requestfactory.gwt.client.RequestFactoryEditorDriver;


 /**
  * View used to edit a task.

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


[gwt-contrib] Fixed malformed REDIRECT URL on login in MobileWebApp (issue1447805)

2011-05-13 Thread rchandia

Reviewers: rjrjr, jlabanca,

Description:
Fixed malformed REDIRECT URL on login in MobileWebApp


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

Affected files:
  M  
samples/mobilewebapp/src/main/com/google/gwt/sample/gaerequest/server/GaeAuthFilter.java
  M  
samples/mobilewebapp/src/main/com/google/gwt/sample/gaerequest/shared/GaeHelper.java



Index:  
samples/mobilewebapp/src/main/com/google/gwt/sample/gaerequest/server/GaeAuthFilter.java

===
---  
samples/mobilewebapp/src/main/com/google/gwt/sample/gaerequest/server/GaeAuthFilter.java	 
(revision 10183)
+++  
samples/mobilewebapp/src/main/com/google/gwt/sample/gaerequest/server/GaeAuthFilter.java	 
(working copy)

@@ -45,7 +45,7 @@
 HttpServletResponse response = (HttpServletResponse) servletResponse;

 if (!userService.isUserLoggedIn()) {
-  response.setHeader(login,  
userService.createLoginURL(GaeHelper.REDIRECT_URL_TOKEN));
+  response.setHeader(login,  
userService.createLoginURL(GaeHelper.REDIRECT_URL));

   response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
   return;
 }
Index:  
samples/mobilewebapp/src/main/com/google/gwt/sample/gaerequest/shared/GaeHelper.java

===
---  
samples/mobilewebapp/src/main/com/google/gwt/sample/gaerequest/shared/GaeHelper.java	 
(revision 10183)
+++  
samples/mobilewebapp/src/main/com/google/gwt/sample/gaerequest/shared/GaeHelper.java	 
(working copy)

@@ -26,4 +26,5 @@
*/
   /* Prefixed with http:// to ensure that GAE doesn't automatically prefix  
it. */

   String REDIRECT_URL_TOKEN = http%3A%2F%2FREDIRECTURL;
+  String REDIRECT_URL = http://REDIRECTURL;;
 }


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


[gwt-contrib] Activities and Places documentation

2011-05-13 Thread Isaac Truett
GWT MVP Development with Activities and
Placeshttp://code.google.com/webtoolkit/doc/latest/DevGuideMvpActivitiesAndPlaces.html
does
not, as far as I can see, contain any reference to the fact that you need to
inherit com.google.gwt.activity.Activity and com.google.gwt.place.Place.
Shouldn't it? Did I miss that being called out somewhere else?

- Isaac

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

[gwt-contrib] First example of a View that kicks off its own presenter as (issue1446806)

2011-05-13 Thread rjrjr

Reviewers: rice,

Description:
First example of a View that kicks off its own presenter as
needed. Part way toward separating presenters from activities, and
making all views self inject their presenters.  When we're done, we'll
have proper MVP separation, but will be able to assemble widgets
directly without having to think about their presenters: presenter as
widget implementation detail, and still completely JRE safe.

Activities no longer know about PlaceController. Instead they post
events when they are done.  Clearly we need to make it easier to
declare new types of events with less boilerplate.


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

Affected files:
  M  
samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/App.java
  M  
samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/ClientFactoryImplMobile.java
  M  
samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/ClientFactoryImplTablet.java
  A  
samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/ProvidesPresenter.java
  M  
samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/activity/TaskEditActivity.java
  M  
samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/activity/TaskListActivity.java
  M  
samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/activity/TaskListView.java
  M  
samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/desktop/DesktopTaskListView.java
  A  
samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/desktop/MainMenuItem.java
  M  
samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/desktop/MobileWebAppShellDesktop.java
  A  
samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/event/AddTaskEvent.java
  A  
samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/event/EditingCanceledEvent.java
  A  
samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/event/GoHomeEvent.java
  A  
samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/event/ShowTaskEvent.java
  A  
samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/event/TaskSavedEvent.java
  M  
samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/mobile/MobileTaskListView.java
  M  
samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/mobile/MobileWebAppShellMobile.java
  M  
samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/place/TaskEditPlace.java
  M  
samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/place/TaskListPlace.java
  M  
samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/tablet/MobileWebAppShellTablet.java

  D samples/mobilewebapp/war/WEB-INF/classes/marker


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


[gwt-contrib] Re: First example of a View that kicks off its own presenter as (issue1446806)

2011-05-13 Thread rice

LGTM

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

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


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

2011-05-13 Thread codesite-noreply

Comment by ad...@dualsportmaps.com:

Can we get a reference implementation of a JRE RequestTransport? Perhaps  
going to http://localhost:/rf ? I think that would help a lot of people  
wrap there head around this.

Thank you!

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

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


[gwt-contrib] Re: This change works around a problem found in GWT Designer testing. (issue1446805)

2011-05-13 Thread scottb

LGTM

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

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