[gwt-contrib] [google-web-toolkit] r10174 committed - Adding favicon and app_icon to the app cache manifest file.

2011-05-10 Thread codesite-noreply

Revision: 10174
Author:   jlaba...@google.com
Date: Tue May 10 20:32:44 2011
Log:  Adding favicon and app_icon to the app cache manifest file.

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

Modified:
  
/trunk/samples/mobilewebapp/src/dev/com/google/gwt/sample/mobilewebapp/linker/AppCacheLinker.java


===
---  
/trunk/samples/mobilewebapp/src/dev/com/google/gwt/sample/mobilewebapp/linker/AppCacheLinker.java	 
Wed May  4 09:12:17 2011
+++  
/trunk/samples/mobilewebapp/src/dev/com/google/gwt/sample/mobilewebapp/linker/AppCacheLinker.java	 
Tue May 10 20:32:44 2011

@@ -32,6 +32,8 @@
 return new String[] {
 "/MobileWebApp.html",
 "/MobileWebApp.css",
+"/favicon.ico",
+"/app_icon.png",
 "/audio/error.mp3",
 "/audio/error.ogg",
 "/audio/error.wav",

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


[gwt-contrib] [google-web-toolkit] r10173 committed - Multiple improvements and fixes to the mobile web app. Tasks are now ...

2011-05-10 Thread codesite-noreply

Revision: 10173
Author:   jlaba...@google.com
Date: Tue May 10 20:04:34 2011
Log:  Multiple improvements and fixes to the mobile web app.  Tasks are  
now stored in local storage using the TaskProxyLocalStorage class, which is  
also used when refreshing a task offline in the TaskReadView.  I renamed  
the app to Cloud Tasks, and added a favicon and homepage icon.  Also fixed  
a bug where the "add task" button doesn't show up in the tablet view after  
editing a task.


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

Added:
  
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/TaskProxyLocalStorage.java

 /trunk/samples/mobilewebapp/war/app_icon.png
 /trunk/samples/mobilewebapp/war/favicon.ico
Modified:
  
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/ClientFactory.java
  
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/ClientFactoryImpl.java
  
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/ClientFactoryImplMobile.java
  
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/activity/TaskEditActivity.java
  
/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/activity/TaskReadView.java
  
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/desktop/MobileWebAppShellDesktop.java
  
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/desktop/MobileWebAppShellDesktop.ui.xml
  
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/mobile/MobileWebAppShellMobile.java
  
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/mobile/MobileWebAppShellMobile.ui.xml
  
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/tablet/MobileWebAppShellTablet.java
  
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/tablet/MobileWebAppShellTablet.ui.xml

 /trunk/samples/mobilewebapp/war/MobileWebApp.html

===
--- /dev/null
+++  
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/TaskProxyLocalStorage.java	 
Tue May 10 20:04:34 2011

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

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

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

+ * the License.
+ */
+package com.google.gwt.sample.mobilewebapp.client;
+
+import com.google.gwt.sample.mobilewebapp.shared.TaskProxy;
+import com.google.gwt.sample.mobilewebapp.shared.TaskProxyImpl;
+import com.google.gwt.storage.client.Storage;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Manages the storage and retrieval of local tasks.
+ */
+public class TaskProxyLocalStorage {
+
+  private static final String TASKLIST_SAVE_KEY = "TASKLIST";
+  private static final String TASKSEP = "&&";
+  private static final String FIELDSEP = "@@";
+  private static final String FIELDEMPTY = "***";
+
+  /**
+   * Convert a task proxy list into a string.
+   */
+  private static String getStringFromTaskProxy(List list) {
+StringBuilder sb = new StringBuilder();
+for (TaskProxy proxy : list) {
+  sb.append(proxy.getDueDate() != null ?  
proxy.getDueDate().getTime() : FIELDEMPTY);

+  sb.append(FIELDSEP);
+  sb.append(proxy.getId() != null ? proxy.getId() : "");
+  sb.append(FIELDSEP);
+  String name = proxy.getName();
+  sb.append(name != null && name.length() > 0 ? proxy.getName() :  
FIELDEMPTY);

+  sb.append(FIELDSEP);
+  String notes = proxy.getNotes();
+  sb.append(notes != null && notes.length() > 0 ? proxy.getNotes() :  
FIELDEMPTY);

+  sb.append(TASKSEP);
+}
+return sb.toString();
+  }
+
+  /**
+   * Parse a task proxy list from a string.
+   */
+  private static List getTaskProxyFromString(String  
taskProxyList) {

+ArrayList list = new ArrayList(0);
+if (taskProxyList == null) {
+  return list;
+}
+// taskproxy1&&taskproxy2&&taskproxy3&&...
+String taskProxyStrings[] = taskProxyList.split(TASKSEP);
+for (String taskProxyString : taskProxyStrings) {
+  if (taskProxyString == null) {
+continue;
+  }
+  // date@@id@@name@@notes
+  String taskProxyStringData[] = task

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

2011-05-10 Thread scottb

This is ready for review now.

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

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


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

2011-05-10 Thread scottb

Reviewers: cromwellian, jbrosenberg,

Message:
Helps with my GwtAstBuilder work.



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

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



Index: dev/core/src/com/google/gwt/dev/jjs/ast/JField.java
diff --git a/dev/core/src/com/google/gwt/dev/jjs/ast/JField.java  
b/dev/core/src/com/google/gwt/dev/jjs/ast/JField.java
index  
412198f762ef5c19656ce4045f34e5469a6b5306..9eb6b29bc397f56c71e7939ea8879551982b2c8c  
100644

--- a/dev/core/src/com/google/gwt/dev/jjs/ast/JField.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/ast/JField.java
@@ -67,6 +67,17 @@ public class JField extends JVariable implements  
CanBeStatic, HasEnclosingType {

 }
   }

+  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 @@ public class JField extends JVariable implements  
CanBeStatic, HasEnclosingType {

   protected Object writeReplace() {
 if (enclosingType != null && enclosingType.isExternal()) {
   return new ExternalSerializedForm(this);
+} else if (this == NULL_FIELD) {
+  return ExternalSerializedNullField.INSTANCE;
 } else {
   return this;
 }
Index: dev/core/src/com/google/gwt/dev/jjs/ast/JMethod.java
diff --git a/dev/core/src/com/google/gwt/dev/jjs/ast/JMethod.java  
b/dev/core/src/com/google/gwt/dev/jjs/ast/JMethod.java
index  
4b5172e341e89b35ec47f1b1032a16ab60f3f726..faa14bc4024ff4f6291e09d066c044d60979728f  
100644

--- a/dev/core/src/com/google/gwt/dev/jjs/ast/JMethod.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/ast/JMethod.java
@@ -55,8 +55,24 @@ public class JMethod extends JNode implements  
HasEnclosingType, HasName, HasType

 }
   }

+  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 @@ public class JMethod extends JNode implements  
HasEnclosingType, HasName, HasType

   protected Object writeReplace() {
 if (enclosingType != null && enclosingType.isExternal()) {
   return new ExternalSerializedForm(this);
+} else if (this == NULL_METHOD) {
+  return ExternalSerializedNullMethod.INSTANCE;
 } else {
   return this;
 }
Index: dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java
diff --git a/dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java  
b/dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java
index  
ca36e8564cdafcbeda229b08c799a5a36b4922e6..7af2bd8dd17ff66faa37b381f862f34cf13fd3d6  
100644

--- a/dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java
@@ -335,10 +335,6 @@ public class JProgram extends JNode {

   private final Map instanceToStaticMap = new  
IdentityHashMap();


-  private JField nullField;
-
-  private JMethod nullMethod;
-
   private Map queryIds;

   /**
@@ -855,22 +851,11 @@ public class JProgram extends JNode {
   }

   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);
- 

[gwt-contrib] Re: SafeHtmlRenderer code gen for UiBinder. (issue1427810)

2011-05-10 Thread rchandia

Still bad content errors. Not fixed yet, it seems.

On 2011/05/10 21:42:15, rchandia wrote:



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

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


[gwt-contrib] Re: SafeHtmlRenderer code gen for UiBinder. (issue1427810)

2011-05-10 Thread rchandia

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

--
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-10 Thread rdcastro

LGTM

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

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


[gwt-contrib] [google-web-toolkit] r10172 committed - Add styleName attribute to Grid...

2011-05-10 Thread codesite-noreply

Revision: 10172
Author:   tfisc...@google.com
Date: Tue May 10 08:14:26 2011
Log:  Add styleName attribute to Grid

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

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

Modified:
 /trunk/user/src/com/google/gwt/uibinder/elementparsers/GridParser.java
 /trunk/user/src/com/google/gwt/user/client/ui/Grid.java
 /trunk/user/test/com/google/gwt/uibinder/elementparsers/GridParserTest.java

===
--- /trunk/user/src/com/google/gwt/uibinder/elementparsers/GridParser.java	 
Wed Mar  9 09:01:28 2011
+++ /trunk/user/src/com/google/gwt/uibinder/elementparsers/GridParser.java	 
Tue May 10 08:14:26 2011

@@ -31,28 +31,59 @@
   private static class CellContent {
 private String tagName;
 private String content;
-
-public CellContent(String tagName, String content) {
+private String styleName;
+
+public CellContent(String tagName, String content, String styleName) {
   this.tagName = tagName;
   this.content = content;
+  this.styleName = styleName;
 }

-public String getConent() {
+public String getContent() {
   return this.content;
 }
+
+public String getStyleName() {
+  return styleName;
+}

 public String getTagName() {
   return this.tagName;
 }
   }
+
+  private static class RowContent {
+private List columns = new ArrayList();
+private String styleName;
+
+private void addColumn(CellContent column) {
+  columns.add(column);
+}
+
+public List getColumns() {
+  return columns;
+}
+
+public String getStyleName() {
+  return styleName;
+}
+
+public void setColumns(List columns) {
+  this.columns = columns;
+}
+
+public void setStyleName(String styleName) {
+  this.styleName = styleName;
+}
+  }

   private static class Size {
 private int rows;
 private int columns;

-public Size() {
-  this.rows = 0;
-  this.columns = 0;
+public Size(int rows, int columns) {
+  this.rows = rows;
+  this.columns = columns;
 }

 public int getColumns() {
@@ -62,14 +93,6 @@
 public int getRows() {
   return this.rows;
 }
-
-public void setColumns(int cols) {
-  this.columns = cols;
-}
-
-public void setRows(int rows) {
-  this.rows = rows;
-}
   }

   private static final String ROW_TAG = "row";
@@ -78,10 +101,12 @@

   private static final String CUSTOMCELL_TAG = "customCell";

+  private static final String STYLE_NAME_ATTRIBUTE = "styleName";
+
   public void parse(XMLElement elem, String fieldName, JClassType type,
   UiBinderWriter writer) throws UnableToCompleteException {

-List> matrix = new ArrayList>();
+List matrix = new ArrayList();

 parseRows(elem, fieldName, writer, matrix);
 Size size = getMatrixSize(matrix);
@@ -90,40 +115,48 @@
   writer.addStatement("%s.resize(%s, %s);", fieldName,
   Integer.toString(size.getRows()),  
Integer.toString(size.getColumns()));


-  for (List row : matrix) {
-for (CellContent column : row) {
+  for (RowContent row : matrix) {
+if ((row.getStyleName() != null) &&  
(!row.getStyleName().isEmpty())) {

+  writer.addStatement("%s.getRowFormatter().setStyleName(%s, %s);",
+  fieldName,
+  matrix.indexOf(row),
+  row.getStyleName());
+}
+
+for (CellContent column : row.getColumns()) {
   if (column.getTagName().equals(CELL_TAG)) {
 writer.addStatement("%s.setHTML(%s, %s, %s);", fieldName,
 Integer.toString(matrix.indexOf(row)),
-Integer.toString(row.indexOf(column)),
-writer.declareTemplateCall(column.getConent()));
+Integer.toString(row.getColumns().indexOf(column)),
+writer.declareTemplateCall(column.getContent()));
   }
   if (column.getTagName().equals(CUSTOMCELL_TAG)) {
 writer.addStatement("%s.setWidget(%s, %s, %s);", fieldName,
 Integer.toString(matrix.indexOf(row)),
-Integer.toString(row.indexOf(column)), column.getConent());
+Integer.toString(row.getColumns().indexOf(column)),  
column.getContent());

+  }
+  if ((column.getStyleName() != null) &&  
(!column.getStyleName().isEmpty())) {
+ 
writer.addStatement("%s.getCellFormatter().setStyleName(%s, %s, %s);",

+fieldName,
+matrix.indexOf(row),
+row.getColumns().indexOf(column),
+column.getStyleName());
   }
 }
   }
 }
   }

-  private Size getMatrixSize(List> matrix) {
-Size size = new Size();
-
-size.setRows(matrix.size());
-
+  private Size getMatrixSize(List matrix) {
 int maxColumns = 0;
-for (List column : matrix) {
-  maxColumns = (column.size() > maxColum

[gwt-contrib] Re: Add styleName attribute to Grid (issue1441802)

2011-05-10 Thread rchandia

LGTM

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

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


[gwt-contrib] Re: Add styleName attribute to Grid (issue1441802)

2011-05-10 Thread rchandia

Mostly nits.


http://gwt-code-reviews.appspot.com/1441802/diff/1/user/src/com/google/gwt/uibinder/elementparsers/GridParser.java
File user/src/com/google/gwt/uibinder/elementparsers/GridParser.java
(right):

http://gwt-code-reviews.appspot.com/1441802/diff/1/user/src/com/google/gwt/uibinder/elementparsers/GridParser.java#newcode71
user/src/com/google/gwt/uibinder/elementparsers/GridParser.java:71:
public String getStyleName() {
Checkstyle error. This should go after getColumns(). Probably makes
smoke test fail.

http://gwt-code-reviews.appspot.com/1441802/diff/1/user/src/com/google/gwt/uibinder/elementparsers/GridParser.java#newcode172
user/src/com/google/gwt/uibinder/elementparsers/GridParser.java:172:
String styleName = cell.consumeStringAttribute(STYLE_NAME_ATTRIBUTE,
null);
Avoid repeating code. Can you move this outside the if?

http://gwt-code-reviews.appspot.com/1441802/diff/1/user/src/com/google/gwt/uibinder/elementparsers/GridParser.java#newcode179
user/src/com/google/gwt/uibinder/elementparsers/GridParser.java:179:
String styleName = cell.consumeStringAttribute(STYLE_NAME_ATTRIBUTE,
null);
See previous note

http://gwt-code-reviews.appspot.com/1441802/diff/1/user/src/com/google/gwt/user/client/ui/Grid.java
File user/src/com/google/gwt/user/client/ui/Grid.java (right):

http://gwt-code-reviews.appspot.com/1441802/diff/1/user/src/com/google/gwt/user/client/ui/Grid.java#newcode48
user/src/com/google/gwt/user/client/ui/Grid.java:48: *  
These could confuse users into thinking the styleName is mandatory.
Perhaps name these "optionalHeaderStyle" and such, or explicitly mention
it in the preceding text.

http://gwt-code-reviews.appspot.com/1441802/diff/1/user/test/com/google/gwt/uibinder/elementparsers/GridParserTest.java
File
user/test/com/google/gwt/uibinder/elementparsers/GridParserTest.java
(right):

http://gwt-code-reviews.appspot.com/1441802/diff/1/user/test/com/google/gwt/uibinder/elementparsers/GridParserTest.java#newcode26
user/test/com/google/gwt/uibinder/elementparsers/GridParserTest.java:26:

Whitespace

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

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


[gwt-contrib] Re: Disabling test for null on getBrowserById for DOM elements without DTD when running on Chrome 12 (issue1443801)

2011-05-10 Thread rchandia

Submitted as of r10169



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

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


[gwt-contrib] [google-web-toolkit] r10171 committed - Remove JProgram.jsniMap in favor of local accounting....

2011-05-10 Thread codesite-noreply

Revision: 10171
Author:   sco...@google.com
Date: Tue May 10 05:59:20 2011
Log:  Remove JProgram.jsniMap in favor of local accounting.

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

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

Added:
 /trunk/dev/core/src/com/google/gwt/dev/jjs/ast/js/JsniClassLiteral.java
Modified:
 /trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java
 /trunk/dev/core/src/com/google/gwt/dev/jjs/ast/js/JsniMethodBody.java
 /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaAST.java
 /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java
 /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java
 /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/Pruner.java

===
--- /dev/null
+++ /trunk/dev/core/src/com/google/gwt/dev/jjs/ast/js/JsniClassLiteral.java	 
Tue May 10 05:59:20 2011

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

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

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

+ * the License.
+ */
+package com.google.gwt.dev.jjs.ast.js;
+
+import com.google.gwt.dev.jjs.SourceInfo;
+import com.google.gwt.dev.jjs.ast.JClassLiteral;
+import com.google.gwt.dev.jjs.ast.JType;
+
+/**
+ * JSNI reference to a Java class literal.
+ */
+public class JsniClassLiteral extends JClassLiteral {
+
+  private final String ident;
+
+  public JsniClassLiteral(SourceInfo info, String ident, JType type) {
+super(info, type);
+this.ident = ident;
+  }
+
+  public String getIdent() {
+return ident;
+  }
+}
===
--- /trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java	Tue Apr 19  
10:10:18 2011
+++ /trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java	Tue May 10  
05:59:20 2011

@@ -311,8 +311,6 @@
*/
   public final List> entryMethods = new  
ArrayList>();


-  public final Map jsniMap = new HashMap();
-
   public final JTypeOracle typeOracle = new JTypeOracle(this);

   /**
===
--- /trunk/dev/core/src/com/google/gwt/dev/jjs/ast/js/JsniMethodBody.java	 
Thu Mar  3 14:34:14 2011
+++ /trunk/dev/core/src/com/google/gwt/dev/jjs/ast/js/JsniMethodBody.java	 
Tue May 10 05:59:20 2011

@@ -18,7 +18,6 @@
 import com.google.gwt.dev.jjs.SourceInfo;
 import com.google.gwt.dev.jjs.ast.Context;
 import com.google.gwt.dev.jjs.ast.JAbstractMethodBody;
-import com.google.gwt.dev.jjs.ast.JClassLiteral;
 import com.google.gwt.dev.jjs.ast.JVisitor;
 import com.google.gwt.dev.js.ast.JsContext;
 import com.google.gwt.dev.js.ast.JsFunction;
@@ -37,7 +36,7 @@
  */
 public class JsniMethodBody extends JAbstractMethodBody {

-  private List classRefs = Collections.emptyList();
+  private List classRefs = Collections.emptyList();
   private JsFunction jsFunction = null;
   private List jsniFieldRefs = Collections.emptyList();
   private List jsniMethodRefs = Collections.emptyList();
@@ -51,7 +50,7 @@
   /**
* Adds a reference from this method to a Java class literal.
*/
-  public void addClassRef(JClassLiteral ref) {
+  public void addClassRef(JsniClassLiteral ref) {
 classRefs = Lists.add(classRefs, ref);
   }

@@ -72,7 +71,7 @@
   /**
* Return this method's references to Java class literals.
*/
-  public List getClassRefs() {
+  public List getClassRefs() {
 return classRefs;
   }

===
--- /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaAST.java	 
Thu May  5 06:03:58 2011
+++ /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaAST.java	 
Tue May 10 05:59:20 2011

@@ -90,6 +90,7 @@
 import com.google.gwt.dev.jjs.ast.JVariable;
 import com.google.gwt.dev.jjs.ast.JVariableRef;
 import com.google.gwt.dev.jjs.ast.JWhileStatement;
+import com.google.gwt.dev.jjs.ast.js.JsniClassLiteral;
 import com.google.gwt.dev.jjs.ast.js.JsniFieldRef;
 import com.google.gwt.dev.jjs.ast.js.JsniMethodBody;
 import com.google.gwt.dev.jjs.ast.js.JsniMethodRef;
@@ -2843,8 +2844,9 @@
 });
   }

-  private void processClassLiteral(JClassLiteral classLiteral,  
JsContext ctx) {
+  private void processClassLiteral(JsNameRef nameRef, SourceInfo info,  
JType type, JsContext ctx) {

 assert !ctx.isLvalue();
+JsniClassLiteral classLiteral = new JsniClassLiteral(info,  
nameRef.getIdent(), type);

 nativeMethodBody.addClassRef(classLiteral);
   }

@@ -2885,24 +2887,21 @@
 // TODO: make this tig

[gwt-contrib] [google-web-toolkit] r10170 committed - See http://code.google.com/p/google-web-toolkit/issues/detail?id=6015...

2011-05-10 Thread codesite-noreply

Revision: 10170
Author:   zun...@google.com
Date: Tue May 10 03:27:54 2011
Log:  See  
http://code.google.com/p/google-web-toolkit/issues/detail?id=6015


Log error instead of throwing when a generated unit cannot be transferred  
to a
file, so that filenames exceeding file system limits don't make the whole  
build

fail).

Patch from tbroyer

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

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

Modified:
 /trunk/dev/core/src/com/google/gwt/dev/javac/StandardGeneratorContext.java

===
---  
/trunk/dev/core/src/com/google/gwt/dev/javac/StandardGeneratorContext.java	 
Tue Apr 26 08:02:24 2011
+++  
/trunk/dev/core/src/com/google/gwt/dev/javac/StandardGeneratorContext.java	 
Tue May 10 03:27:54 2011

@@ -67,12 +67,12 @@
 public class StandardGeneratorContext implements GeneratorContextExt {

   /**
-   * Extras added to {@link CompilationUnit}.
+   * Extras added to {@link GeneratedUnit}.
*/
-  public static interface Generated extends GeneratedUnit {
+  private static interface Generated extends GeneratedUnit {
 void abort();

-void commit();
+void commit(TreeLogger logger);

 /**
  * Returns the strong hash of the source.
@@ -83,7 +83,7 @@
   }

   /**
-   * This compilation unit acts as a normal compilation unit as well as a  
buffer
+   * This generated unit acts as a normal generated unit as well as a  
buffer
* into which generators can write their source. A controller should  
ensure
* that source isn't requested until the generator has finished writing  
it.

* This version is backed by {@link StandardGeneratorContext#diskCache}.
@@ -113,9 +113,9 @@
 }

 /**
- * Finalizes the source and adds this compilation unit to the host.
+ * Finalizes the source and adds this generated unit to the host.
  */
-public void commit() {
+public void commit(TreeLogger logger) {
   String source = sw.toString();
   strongHash = Util.computeStrongName(Util.getBytes(source));
   sourceToken = diskCache.writeString(source);
@@ -155,7 +155,7 @@
   }

   /**
-   * This compilation unit acts as a normal compilation unit as well as a  
buffer
+   * This generated unit acts as a normal generated unit as well as a  
buffer
* into which generators can write their source. A controller should  
ensure
* that source isn't requested until the generator has finished writing  
it.

* This version is backed by an explicit generated file.
@@ -169,15 +169,15 @@
 }

 @Override
-public void commit() {
-  super.commit();
+public void commit(TreeLogger logger) {
+  super.commit(logger);
   FileOutputStream fos = null;
   try {
 fos = new FileOutputStream(file);
 diskCache.transferToStream(sourceToken, fos);
   } catch (IOException e) {
-throw new RuntimeException("Error writing out generated unit at '"
-+ file.getAbsolutePath() + "'", e);
+logger.log(TreeLogger.WARN, "Error writing out generated unit at '"
++ file.getAbsolutePath() + "': " + e);
   } finally {
 Utility.close(fos);
   }
@@ -185,7 +185,7 @@

 @Override
 public String optionalFileLocation() {
-  return file.getAbsolutePath();
+  return file.exists() ? file.getAbsolutePath() : null;
 }
   }

@@ -382,7 +382,7 @@
   public final void commit(TreeLogger logger, PrintWriter pw) {
 Generated gcup = uncommittedGeneratedCupsByPrintWriter.get(pw);
 if (gcup != null) {
-  gcup.commit();
+  gcup.commit(logger);
   uncommittedGeneratedCupsByPrintWriter.remove(pw);
   committedGeneratedCups.put(gcup.getTypeName(), gcup);
 } else {

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


[gwt-contrib] [google-web-toolkit] r10169 committed - Disabling test for null on getBrowserById for DOM elements without DTD...

2011-05-10 Thread codesite-noreply

Revision: 10169
Author:   rchan...@google.com
Date: Mon May  9 11:41:57 2011
Log:  Disabling test for null on getBrowserById for DOM elements  
without DTD when running on Chrome 12


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

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

Modified:
 /trunk/user/test/com/google/gwt/xml/client/XMLTest.java

===
--- /trunk/user/test/com/google/gwt/xml/client/XMLTest.java	Fri May  6  
13:29:14 2011
+++ /trunk/user/test/com/google/gwt/xml/client/XMLTest.java	Mon May  9  
11:41:57 2011

@@ -217,8 +217,8 @@

 // we didn't define a dtd, so no id for us
 Element e1NodeDirect = d.getElementById("e1Id");
-// Chrome 11 fails to implement this behavior
-if (!Window.Navigator.getUserAgent().contains("Chrome/11.")) {
+// Chrome 11 and 12 fail to implement this behavior
+if (!Window.Navigator.getUserAgent().matches(".*Chrome/1[12]\\..*")) {
   assertNull(e1NodeDirect);
 }

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


[gwt-contrib] [google-web-toolkit] r10168 committed - Better error reporting. Also, move the proxy and request interfaces...

2011-05-10 Thread codesite-noreply

Revision: 10168
Author:   rj...@google.com
Date: Mon May  9 10:55:18 2011
Log:  Better error reporting. Also, move the proxy and request  
interfaces

to shared, where they belong — the servlet validates against them.

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

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

Added:
  
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/shared/MobileWebAppRequestFactory.java
  
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/shared/TaskRequest.java

Deleted:
  
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/MobileWebAppRequestFactory.java
  
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/TaskRequest.java

Modified:
  
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/App.java
  
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/ClientFactory.java
  
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/ClientFactoryImpl.java
  
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/activity/TaskEditActivity.java


===
--- /dev/null
+++  
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/shared/MobileWebAppRequestFactory.java	 
Mon May  9 10:55:18 2011

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

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

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

+ * the License.
+ */
+package com.google.gwt.sample.mobilewebapp.shared;
+
+import com.google.web.bindery.requestfactory.shared.RequestFactory;
+
+/**
+ * Request factory for this app.
+ */
+public interface MobileWebAppRequestFactory extends RequestFactory {
+
+  /**
+   * Create a new {@link TaskRequest}.
+   */
+  TaskRequest taskRequest();
+}
===
--- /dev/null
+++  
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/shared/TaskRequest.java	 
Mon May  9 10:55:18 2011

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

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

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

+ * the License.
+ */
+package com.google.gwt.sample.mobilewebapp.shared;
+
+import com.google.gwt.sample.mobilewebapp.server.domain.Task;
+import com.google.web.bindery.requestfactory.shared.InstanceRequest;
+import com.google.web.bindery.requestfactory.shared.Request;
+import com.google.web.bindery.requestfactory.shared.RequestContext;
+import com.google.web.bindery.requestfactory.shared.Service;
+
+import java.util.List;
+
+/**
+ * Remote request for {@link Task}.
+ */
+@Service(Task.class)
+public interface TaskRequest extends RequestContext {
+
+  /**
+   * Create a {@link Request} for all tasks.
+   *
+   * @return a {@link Request}
+   */
+  Request> findAllTasks();
+
+  /**
+   * Create a {@link Request} to find a Task by id.
+   *
+   * @param id the task id
+   * @return a {@link Request}
+   */
+  Request findTask(Long id);
+
+  /**
+   * Persist a Task instance in the datastore.
+   *
+   * @return an {@link InstanceRequest}
+   */
+  InstanceRequest persist();
+
+  /**
+   * Remove a Task instance from the datastore.
+   *
+   * @return an {@link InstanceRequest}
+   */
+  InstanceRequest remove();
+}
===
---  
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/MobileWebAppRequestFactory.java	 
Tue May  3 10:43:13 2011

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

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

- * WARRANTIES

[gwt-contrib] Re: Discards the jar file name in the resource location. It isn't necessary, and (issue1428805)

2011-05-10 Thread zundel

On 2011/05/03 18:57:36, scottb wrote:

I mean only super-sourced.  Does Object come through as
'com/google/gwt/emul/java/lang/Object.java' or merely
'java/lang/Object.java'?



Sigh.. no.  I just got this up in the debugger and saw that
RerootedResource re-writes
com/google/gwt/emul/java/Util/Collections.java  to
java/util/Collections.java.

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

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


[gwt-contrib] Re: Remove JProgram.jsniMap in favor of local accounting. (issue1445801)

2011-05-10 Thread scottb


http://gwt-code-reviews.appspot.com/1445801/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 (left):

http://gwt-code-reviews.appspot.com/1445801/diff/1/dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java#oldcode235
dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java:235: *
On 2011/05/10 07:44:10, jbrosenberg wrote:

Is this TODONE?


Yep, this was done a while back, and I forgot to remove the comment,
noticed it while I was in here.  thanks!

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

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


[gwt-contrib] Re: Log error instead of throwing when a generated unit cannot be transferred to a file. (issue1357804)

2011-05-10 Thread zundel

LGTM

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

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


[gwt-contrib] Re: Remove JProgram.jsniMap in favor of local accounting. (issue1445801)

2011-05-10 Thread jbrosenberg

LGTM


http://gwt-code-reviews.appspot.com/1445801/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 (left):

http://gwt-code-reviews.appspot.com/1445801/diff/1/dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java#oldcode235
dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java:235: *
Is this TODONE?

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

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