[gwt-contrib] Re: Integrating Peng's recent API changes to CellTableBuilder into HeaderCreator. HeaderCreator now... (issue1533804)

2011-08-26 Thread skybrian

Looks like it will work. Raised some issues that might be addressed in
another CL.



http://gwt-code-reviews.appspot.com/1533804/diff/1/user/src/com/google/gwt/user/cellview/client/AbstractCellTable.java
File user/src/com/google/gwt/user/cellview/client/AbstractCellTable.java
(right):

http://gwt-code-reviews.appspot.com/1533804/diff/1/user/src/com/google/gwt/user/cellview/client/AbstractCellTable.java#newcode715
user/src/com/google/gwt/user/cellview/client/AbstractCellTable.java:715:
private static SafeHtml tableSectionToSafeHtml(TableSectionBuilder
section, String tag) {
@param tag: the expected tag ("thead" or "tfoot")

http://gwt-code-reviews.appspot.com/1533804/diff/1/user/src/com/google/gwt/user/cellview/client/AbstractCellTable.java#newcode718
user/src/com/google/gwt/user/cellview/client/AbstractCellTable.java:718:
"HeaderCreator must return a builder of type HtmlTableSectionBuilder");
Does this need to be a runtime check, or should we change the type in
HeaderCreator to match?

http://gwt-code-reviews.appspot.com/1533804/diff/1/user/src/com/google/gwt/user/cellview/client/HeaderCreator.java
File user/src/com/google/gwt/user/cellview/client/HeaderCreator.java
(right):

http://gwt-code-reviews.appspot.com/1533804/diff/1/user/src/com/google/gwt/user/cellview/client/HeaderCreator.java#newcode22
user/src/com/google/gwt/user/cellview/client/HeaderCreator.java:22: *
Creates the DOM elements for the header or footer section of a
CellTable.
"Also provides queries on elements in the last DOM subtree that it
created."

http://gwt-code-reviews.appspot.com/1533804/diff/1/user/src/com/google/gwt/user/cellview/client/HeaderCreator.java#newcode27
user/src/com/google/gwt/user/cellview/client/HeaderCreator.java:27: *
builder's state should be reset.
It's unclear what sort of state you mean. I think this is probably
covered by saying that the query methods have to work on DOM elements
from the most recent call to buildHeader().

http://gwt-code-reviews.appspot.com/1533804/diff/1/user/src/com/google/gwt/user/cellview/client/HeaderCreator.java#newcode41
user/src/com/google/gwt/user/cellview/client/HeaderCreator.java:41: //
TODO(jlabanca): Rename to HeaderBuilder?
Hmm. There is one method that builds a DOM element and the rest are
query functions on the DOM. It's not so easy to come up with a name for
that. Perhaps HeaderAppearance, except that has other connotations. Or
TableSectionBuilder, but we already have one of those.

HeaderBuilder is at least consistent so I'm fine with that.

http://gwt-code-reviews.appspot.com/1533804/diff/1/user/src/com/google/gwt/user/cellview/client/HeaderCreator.java#newcode42
user/src/com/google/gwt/user/cellview/client/HeaderCreator.java:42:
public interface HeaderCreator {
From a type system point of view, Headers are not normally
interchangeable with Footers (and we make sure of this at runtime), so
it's weird that they are the same type. (This is a hack that's okay for
implementation but not so great for a public API.) I would arrange the
type hierarchy like this:

AbstractHeaderOrFooterBuilder

DefaultHeaderOrFooterBuilder
  extends AbstractHeaderOrFooterBuilder
  implements HeaderBuilder, FooterBuilder

That is, each subclass of AbstractHeaderOrFooterBuilder should declare
whether it's a header, footer, or both. These interfaces would be the
same except that one declares buildHeader() and the other declares
buildFooter().

This would be a clearer API when looking at GWT code in google3 because
you could look at all the subclasses of HeaderBuilder to find headers
and all the subclasses of FooterBuilder to find footers.

http://gwt-code-reviews.appspot.com/1533804/diff/1/user/src/com/google/gwt/user/cellview/client/HeaderCreator.java#newcode45
user/src/com/google/gwt/user/cellview/client/HeaderCreator.java:45: *
Build the entire header table, resetting any state associated with the
How about: "Builds the DOM subtree for this header or footer. The root
of the subtree must be a THEAD or TFOOT element, as appropriate. This
method may be called multiple times and should return a new DOM subtree
each time."

http://gwt-code-reviews.appspot.com/1533804/diff/1/user/src/com/google/gwt/user/cellview/client/HeaderCreator.java#newcode58
user/src/com/google/gwt/user/cellview/client/HeaderCreator.java:58: *
Return the column containing an element.
"Given an element in the DOM subtree returned by the most recent call to
{@link #buildHeader}, returns the Column that should be the target of
any button clicks or other events on that element, or null if the events
should be discarded."

(That's assuming that the parameter is only allowed to be one of those
in the subtree. Is that actually true?)

http://gwt-code-reviews.appspot.com/1533804/diff/1/user/src/com/google/gwt/user/cellview/client/HeaderCreator.java#newcode66
user/src/com/google/gwt/user/cellview/client/HeaderCreator.java:66: *
Return the header containing an element.
", or null if..."

Needs context: why do we need to query to find the He

[gwt-contrib] Re: Firefox 6 DevMode Plugin (issue1523805)

2011-08-26 Thread conroy

On 2011/08/26 21:31:29, acleung wrote:

> Also, looks like you still need to make the Darwin modifications



Thanks for catching that. I forgot that was only on SVN and wasn't

getting

picked up by rietveld.


LGTM

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

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


[gwt-contrib] [google-web-toolkit] r10588 committed - Properly sets FLAG32BIT in Darwin Xulrunner 6.0

2011-08-26 Thread codesite-noreply

Revision: 10588
Author:   acle...@google.com
Date: Fri Aug 26 14:29:57 2011
Log:  Properly sets FLAG32BIT in Darwin Xulrunner 6.0


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

Modified:
 /plugin-sdks/gecko-sdks/gecko-6.0.0/Darwin-gcc3/include/js-config.h
 /plugin-sdks/gecko-sdks/gecko-6.0.0/Darwin-gcc3/include/mozilla-config.h

===
--- /plugin-sdks/gecko-sdks/gecko-6.0.0/Darwin-gcc3/include/js-config.h	Tue  
Aug 23 15:43:53 2011
+++ /plugin-sdks/gecko-sdks/gecko-6.0.0/Darwin-gcc3/include/js-config.h	Fri  
Aug 26 14:29:57 2011

@@ -82,7 +82,16 @@
 /* #undef JS_INT32_TYPE */
 /* #undef JS_INT64_TYPE */
 /* #undef JS_INTPTR_TYPE */
+
+#if FLAG32BIT==32
+#define JS_BYTES_PER_WORD 4
+#elif FLAG32BIT==64
 #define JS_BYTES_PER_WORD 8
+#elif !defined(FLAG32BIT)
+#error FLAG32BIT is not defined
+#else
+#error FLAG32BIT must be 32 or 64
+#endif //FLAG32BIT

 /* Some mozilla code uses JS-friend APIs that depend on JS_TRACER and
JS_METHODJIT being correct. */
===
---  
/plugin-sdks/gecko-sdks/gecko-6.0.0/Darwin-gcc3/include/mozilla-config.h	 
Tue Aug 23 15:43:53 2011
+++  
/plugin-sdks/gecko-sdks/gecko-6.0.0/Darwin-gcc3/include/mozilla-config.h	 
Fri Aug 26 14:29:57 2011

@@ -8,6 +8,22 @@

 #define ATTRIBUTE_ALIGNED_MAX 64
 #define BUILD_CTYPES 1
+
+
+/* 32/64 bundling */
+#if HOST32BIT != FLAG32BIT
+#define CROSS_COMPILE 1
+#endif
+
+#if FLAG32BIT==64
+#define HAVE_VA_LIST_AS_ARRAY 1
+#define HAVE_64BIT_OS 1
+#define LIBJPEG_TURBO_X64_ASM 1
+#elif FLAG32BIT==32
+#define LIBJPEG_TURBO_X86_ASM 1
+#endif
+/* end 32/64 bundling*/
+
 #define D_INO d_ino
 #define HAVE_64BIT_OS 1
 #define HAVE_DIRENT_H 1

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


[gwt-contrib] Re: Integrating Peng's recent API changes to CellTableBuilder into HeaderCreator. HeaderCreator now... (issue1533804)

2011-08-26 Thread rjrjr

LGTM

No strong feelings on the new names.


http://gwt-code-reviews.appspot.com/1533804/diff/1/user/src/com/google/gwt/user/cellview/client/AbstractCellTable.java
File user/src/com/google/gwt/user/cellview/client/AbstractCellTable.java
(right):

http://gwt-code-reviews.appspot.com/1533804/diff/1/user/src/com/google/gwt/user/cellview/client/AbstractCellTable.java#newcode1610
user/src/com/google/gwt/user/cellview/client/AbstractCellTable.java:1610:
* Get the thead element that contains the headers.
'ark at 'im!

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

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


[gwt-contrib] Re: Adding a test case that verifies CellTable works even if all image resources are null. Sort ico... (issue1534803)

2011-08-26 Thread jlabanca

committed as r10587

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

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


[gwt-contrib] [google-web-toolkit] r10587 committed - Adding a test case that verifies CellTable works even if all image res...

2011-08-26 Thread codesite-noreply

Revision: 10587
Author:   gwt.mirror...@gmail.com
Date: Fri Aug 26 09:55:44 2011
Log:  Adding a test case that verifies CellTable works even if all  
image resources are null.  Sort icons are only used if a column is sorted  
(sorting will cause an NPE). Background icons are used in the default  
styles, and are optional. The sorting icon is specially handled to allow  
for null.


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

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

Modified:
 /trunk/user/test/com/google/gwt/user/cellview/client/CellTableTest.java

===
--- /trunk/user/test/com/google/gwt/user/cellview/client/CellTableTest.java	 
Fri Aug 26 09:38:28 2011
+++ /trunk/user/test/com/google/gwt/user/cellview/client/CellTableTest.java	 
Fri Aug 26 09:55:44 2011

@@ -207,6 +207,59 @@
   public ImageResource cellTableSelectedBackground() {
 return defaultRes.cellTableSelectedBackground();
   }
+
+  @Override
+  public ImageResource cellTableSortAscending() {
+return null;
+  }
+
+  @Override
+  public ImageResource cellTableSortDescending() {
+return null;
+  }
+
+  @Override
+  public Style cellTableStyle() {
+return defaultRes.cellTableStyle();
+  }
+};
+
+CellTable table = new CellTable(10, resources);
+populateData(table);
+table.getPresenter().flush();
+  }
+
+  /**
+   * CellTable should not throw any errors if all of the icons are null.
+   *
+   * Sort icons are only used if a column is sorted. Background icons are  
not
+   * used in the default styles, and are optional. The sorting icon is  
specially

+   * handled.
+   */
+  public void testNullIcons() {
+// Create a Resources instance that does not include sort images.
+CellTable.Resources resources = new CellTable.Resources() {
+  private final CellTable.Resources defaultRes =  
GWT.create(CellTable.Resources.class);

+
+  @Override
+  public ImageResource cellTableFooterBackground() {
+return null;
+  }
+
+  @Override
+  public ImageResource cellTableHeaderBackground() {
+return null;
+  }
+
+  @Override
+  public ImageResource cellTableLoading() {
+return null;
+  }
+
+  @Override
+  public ImageResource cellTableSelectedBackground() {
+return null;
+  }

   @Override
   public ImageResource cellTableSortAscending() {

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


[gwt-contrib] Re: Modifying DefaultHeaderCreator to support null sorting indicator images. Until a recent change,... (issue1533803)

2011-08-26 Thread jlabanca

committed as r10586

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

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


[gwt-contrib] Integrating Peng's recent API changes to CellTableBuilder into HeaderCreator. HeaderCreator now... (issue1533804)

2011-08-26 Thread jlabanca

Reviewers: skybrian, rjrjr, peng_google.com,

Description:
Integrating Peng's recent API changes to CellTableBuilder into
HeaderCreator.  HeaderCreator now includes both the rendering code and
the event handling logic, eliminating the HeaderCreator.Helper class
completely.  This allows for a simpler implementation of HeaderCreator
that only supports a single row, or an application specific
implementation, either of which could be lighter weight than the default
implementation.  The API is very similar to CellTableBuilder, but
slightly simpler because there is no concept of row values in a header.
Note that there are no behavioral changes here, its just a rearrangement
of API.

The one big question, which this change does not answer, is which class
to rename: HeaderCreator or CellTableBuilder.  Personally, I think that
both classes are much more builder-like than they were, so maybe we can
just rename HeaderCreator to HeaderBuilder.  That would certainly be the
easiest from an adoption standpoint, as CellTableBuilder already has
wide use and would be harder to rename.

Also, we could drop the "Cell" from CellTableBuilder to make it more
consistent with HeaderBuilder/Creator.  However, that would be a pain,
so I'm happy just leaving CellTableBuilder as is.


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

Affected files:
  M  
samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/CwCustomDataGrid.java

  M user/src/com/google/gwt/user/cellview/client/AbstractCellTable.java
  A user/src/com/google/gwt/user/cellview/client/AbstractHeaderCreator.java
  M user/src/com/google/gwt/user/cellview/client/DefaultHeaderCreator.java
  M user/src/com/google/gwt/user/cellview/client/HeaderCreator.java


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


[gwt-contrib] [google-web-toolkit] r10586 committed - Modifying DefaultHeaderCreator to support null sorting indicator image...

2011-08-26 Thread codesite-noreply

Revision: 10586
Author:   jlaba...@google.com
Date: Fri Aug 26 09:38:28 2011
Log:  Modifying DefaultHeaderCreator to support null sorting indicator  
images.  Until a recent change, CellTable would not throw any errors if the  
sort indicators in the Resources returned null, as long as the CellTable  
was never sorted.  However, DefaultHeaderCreator aggressively caches the  
height and width of the icons.  While this was never officially supported,  
its convenient behavior for people trying to reduce code size by removing  
the inlined image.


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

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

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

 /trunk/user/test/com/google/gwt/user/cellview/client/CellTableTest.java

===
---  
/trunk/user/src/com/google/gwt/user/cellview/client/DefaultHeaderCreator.java	 
Fri Aug 26 07:24:39 2011
+++  
/trunk/user/src/com/google/gwt/user/cellview/client/DefaultHeaderCreator.java	 
Fri Aug 26 09:38:28 2011

@@ -71,10 +71,20 @@
  */
 ImageResource asc = table.getResources().sortAscending();
 ImageResource desc = table.getResources().sortDescending();
-sortAscIconWidth = asc.getWidth() + ICON_PADDING;
-sortDescIconWidth = desc.getWidth() + ICON_PADDING;
-sortAscIconHalfHeight = (int) Math.round(asc.getHeight() / 2.0);
-sortDescIconHalfHeight = (int) Math.round(desc.getHeight() / 2.0);
+if (asc != null) {
+  sortAscIconWidth = asc.getWidth() + ICON_PADDING;
+  sortAscIconHalfHeight = (int) Math.round(asc.getHeight() / 2.0);
+} else {
+  sortAscIconWidth = 0;
+  sortAscIconHalfHeight = 0;
+}
+if (desc != null) {
+  sortDescIconWidth = desc.getWidth() + ICON_PADDING;
+  sortDescIconHalfHeight = (int) Math.round(desc.getHeight() / 2.0);
+} else {
+  sortDescIconWidth = 0;
+  sortDescIconHalfHeight = 0;
+}
   }

   @Override
===
--- /trunk/user/test/com/google/gwt/user/cellview/client/CellTableTest.java	 
Fri Aug 26 07:24:39 2011
+++ /trunk/user/test/com/google/gwt/user/cellview/client/CellTableTest.java	 
Fri Aug 26 09:38:28 2011

@@ -178,6 +178,56 @@
 CellTable table = new CellTable(25, resources);
 assertNull(table.getLoadingIndicator());
   }
+
+  /**
+   * Using a null sort icon should not cause any errors if none of the  
columns

+   * are sortable.
+   */
+  public void testNullSortIcons() {
+// Create a Resources instance that does not include sort images.
+CellTable.Resources resources = new CellTable.Resources() {
+  private final CellTable.Resources defaultRes =  
GWT.create(CellTable.Resources.class);

+
+  @Override
+  public ImageResource cellTableFooterBackground() {
+return defaultRes.cellTableFooterBackground();
+  }
+
+  @Override
+  public ImageResource cellTableHeaderBackground() {
+return defaultRes.cellTableHeaderBackground();
+  }
+
+  @Override
+  public ImageResource cellTableLoading() {
+return defaultRes.cellTableLoading();
+  }
+
+  @Override
+  public ImageResource cellTableSelectedBackground() {
+return defaultRes.cellTableSelectedBackground();
+  }
+
+  @Override
+  public ImageResource cellTableSortAscending() {
+return null;
+  }
+
+  @Override
+  public ImageResource cellTableSortDescending() {
+return null;
+  }
+
+  @Override
+  public Style cellTableStyle() {
+return defaultRes.cellTableStyle();
+  }
+};
+
+CellTable table = new CellTable(10, resources);
+populateData(table);
+table.getPresenter().flush();
+  }

   /**
* Test that removing a column sets its width to zero.

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


[gwt-contrib] Adding a test case that verifies CellTable works even if all image resources are null. Sort ico... (issue1534803)

2011-08-26 Thread jlabanca

Reviewers: eschoeffler,

Description:
Adding a test case that verifies CellTable works even if all image
resources are null.  Sort icons are only used if a column is sorted
(sorting will cause an NPE). Background icons are used in the default
styles, and are optional. The sorting icon is specially handled to allow
for null.


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

Affected files:
  M user/test/com/google/gwt/user/cellview/client/CellTableTest.java


Index: user/test/com/google/gwt/user/cellview/client/CellTableTest.java
===
--- user/test/com/google/gwt/user/cellview/client/CellTableTest.java	 
(revision 10584)
+++ user/test/com/google/gwt/user/cellview/client/CellTableTest.java	 
(working copy)

@@ -230,6 +230,59 @@
   }

   /**
+   * CellTable should not throw any errors if all of the icons are null.
+   *
+   * Sort icons are only used if a column is sorted. Background icons are  
not
+   * used in the default styles, and are optional. The sorting icon is  
specially

+   * handled.
+   */
+  public void testNullIcons() {
+// Create a Resources instance that does not include sort images.
+CellTable.Resources resources = new CellTable.Resources() {
+  private final CellTable.Resources defaultRes =  
GWT.create(CellTable.Resources.class);

+
+  @Override
+  public ImageResource cellTableFooterBackground() {
+return null;
+  }
+
+  @Override
+  public ImageResource cellTableHeaderBackground() {
+return null;
+  }
+
+  @Override
+  public ImageResource cellTableLoading() {
+return null;
+  }
+
+  @Override
+  public ImageResource cellTableSelectedBackground() {
+return null;
+  }
+
+  @Override
+  public ImageResource cellTableSortAscending() {
+return null;
+  }
+
+  @Override
+  public ImageResource cellTableSortDescending() {
+return null;
+  }
+
+  @Override
+  public Style cellTableStyle() {
+return defaultRes.cellTableStyle();
+  }
+};
+
+CellTable table = new CellTable(10, resources);
+populateData(table);
+table.getPresenter().flush();
+  }
+
+  /**
* Test that removing a column sets its width to zero.
*/
   public void testRemoveColumnWithWidth() {


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


[gwt-contrib] Modifying DefaultHeaderCreator to support null sorting indicator images. Until a recent change,... (issue1533803)

2011-08-26 Thread jlabanca

Reviewers: eschoeffler,

Description:
Modifying DefaultHeaderCreator to support null sorting indicator images.
 Until a recent change, CellTable would not throw any errors if the sort
indicators in the Resources returned null, as long as the CellTable was
never sorted.  However, DefaultHeaderCreator aggressively caches the
height and width of the icons.  While this was never officially
supported, its convenient behavior for people trying to reduce code size
by removing the inlined image.


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

Affected files:
  M user/src/com/google/gwt/user/cellview/client/DefaultHeaderCreator.java
  M user/test/com/google/gwt/user/cellview/client/CellTableTest.java


Index:  
user/src/com/google/gwt/user/cellview/client/DefaultHeaderCreator.java

===
--- user/src/com/google/gwt/user/cellview/client/DefaultHeaderCreator.java	 
(revision 10584)
+++ user/src/com/google/gwt/user/cellview/client/DefaultHeaderCreator.java	 
(working copy)

@@ -71,10 +71,20 @@
  */
 ImageResource asc = table.getResources().sortAscending();
 ImageResource desc = table.getResources().sortDescending();
-sortAscIconWidth = asc.getWidth() + ICON_PADDING;
-sortDescIconWidth = desc.getWidth() + ICON_PADDING;
-sortAscIconHalfHeight = (int) Math.round(asc.getHeight() / 2.0);
-sortDescIconHalfHeight = (int) Math.round(desc.getHeight() / 2.0);
+if (asc != null) {
+  sortAscIconWidth = asc.getWidth() + ICON_PADDING;
+  sortAscIconHalfHeight = (int) Math.round(asc.getHeight() / 2.0);
+} else {
+  sortAscIconWidth = 0;
+  sortAscIconHalfHeight = 0;
+}
+if (desc != null) {
+  sortDescIconWidth = desc.getWidth() + ICON_PADDING;
+  sortDescIconHalfHeight = (int) Math.round(desc.getHeight() / 2.0);
+} else {
+  sortDescIconWidth = 0;
+  sortDescIconHalfHeight = 0;
+}
   }

   @Override
Index: user/test/com/google/gwt/user/cellview/client/CellTableTest.java
===
--- user/test/com/google/gwt/user/cellview/client/CellTableTest.java	 
(revision 10584)
+++ user/test/com/google/gwt/user/cellview/client/CellTableTest.java	 
(working copy)

@@ -180,6 +180,56 @@
   }

   /**
+   * Using a null sort icon should not cause any errors if none of the  
columns

+   * are sortable.
+   */
+  public void testNullSortIcons() {
+// Create a Resources instance that does not include sort images.
+CellTable.Resources resources = new CellTable.Resources() {
+  private final CellTable.Resources defaultRes =  
GWT.create(CellTable.Resources.class);

+
+  @Override
+  public ImageResource cellTableFooterBackground() {
+return defaultRes.cellTableFooterBackground();
+  }
+
+  @Override
+  public ImageResource cellTableHeaderBackground() {
+return defaultRes.cellTableHeaderBackground();
+  }
+
+  @Override
+  public ImageResource cellTableLoading() {
+return defaultRes.cellTableLoading();
+  }
+
+  @Override
+  public ImageResource cellTableSelectedBackground() {
+return defaultRes.cellTableSelectedBackground();
+  }
+
+  @Override
+  public ImageResource cellTableSortAscending() {
+return null;
+  }
+
+  @Override
+  public ImageResource cellTableSortDescending() {
+return null;
+  }
+
+  @Override
+  public Style cellTableStyle() {
+return defaultRes.cellTableStyle();
+  }
+};
+
+CellTable table = new CellTable(10, resources);
+populateData(table);
+table.getPresenter().flush();
+  }
+
+  /**
* Test that removing a column sets its width to zero.
*/
   public void testRemoveColumnWithWidth() {


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


[gwt-contrib] [google-web-toolkit] r10585 committed - Edited wiki page RequestFactoryInterfaceValidation through web user in...

2011-08-26 Thread codesite-noreply

Revision: 10585
Author:   rj...@google.com
Date: Fri Aug 26 12:09:28 2011
Log:  Edited wiki page RequestFactoryInterfaceValidation through web  
user interface.

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

Modified:
 /wiki/RequestFactoryInterfaceValidation.wiki

===
--- /wiki/RequestFactoryInterfaceValidation.wikiFri Aug 19 11:42:56 2011
+++ /wiki/RequestFactoryInterfaceValidation.wikiFri Aug 26 12:09:28 2011
@@ -1,6 +1,6 @@
 #summary Provides late validation of RequestFactory interfaces

-When GWT 2.5 is released (at this writing, the current version is 2.3),  
RequestFactory interfaces must be validated before they can be used by the  
RequestFactory server code or JVM-based clients.  This document explains  
the mechanisms for validating those interfaces.
+When GWT 2.4 is released (at this writing, the current version is 2.3),  
RequestFactory interfaces must be validated before they can be used by the  
RequestFactory server code or JVM-based clients.  This document explains  
the mechanisms for validating those interfaces.


 

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


[gwt-contrib] Re: Firefox 6 DevMode Plugin (issue1523805)

2011-08-26 Thread conroy

On 2011/08/26 18:59:42, acleung wrote:

On 2011/08/26 18:58:34, acleung wrote:



Thanks! PTAL



BTW, how do I go about verifying the universal binary is built

correctly? Do I

need to grab an older Mac or am I missing something very obvious?


If you have an older mac, then that works. Otherwise you can always open
Firefox in 32 bit mode (in Finder, right click->Get Info->Open in 32 bit
mode)

Also, looks like you still need to make the Darwin modifications

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

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


[gwt-contrib] [google-web-toolkit] r10584 committed - Make UmbrellaException a bit more convenient to read, and test it....

2011-08-26 Thread codesite-noreply

Revision: 10584
Author:   rj...@google.com
Date: Fri Aug 26 08:45:52 2011
Log:  Make UmbrellaException a bit more convenient to read, and test it.

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

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

Added:
  
/trunk/user/test/com/google/web/bindery/event/shared/UmbrellaExceptionTest.java

Modified:
 /trunk/user/src/com/google/web/bindery/event/shared/UmbrellaException.java

===
--- /dev/null
+++  
/trunk/user/test/com/google/web/bindery/event/shared/UmbrellaExceptionTest.java	 
Fri Aug 26 08:45:52 2011

@@ -0,0 +1,83 @@
+/*
+ * 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.web.bindery.event.shared;
+
+import junit.framework.TestCase;
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * Unit test for {@link #UmbrellaException}.
+ */
+public class UmbrellaExceptionTest extends TestCase {
+  public void testNone() {
+// Why?
+try {
+  throw new UmbrellaException(Collections. emptySet());
+} catch (UmbrellaException e) {
+  assertNull(e.getCause());
+  assertNull(e.getMessage());
+}
+  }
+
+  public void testOne() {
+Set causes = new HashSet();
+String message = "Just me";
+RuntimeException theOne = new RuntimeException(message);
+causes.add(theOne);
+
+try {
+  throw new UmbrellaException(causes);
+} catch (UmbrellaException e) {
+  assertSame(theOne, e.getCause());
+  assertEquals(UmbrellaException.ONE + message, e.getMessage());
+}
+  }
+
+  public void testSome() {
+Set causes = new HashSet();
+String oneMessage = "one";
+RuntimeException oneException = new RuntimeException(oneMessage);
+causes.add(oneException);
+
+String twoMessage = "two";
+RuntimeException twoException = new RuntimeException(twoMessage);
+causes.add(twoException);
+
+try {
+  throw new UmbrellaException(causes);
+} catch (UmbrellaException e) {
+  // A bit non-deterministic for a unit test, but I've checked both  
paths --

+  // rjrjr
+  if (e.getCause() == oneException) {
+assertCauseMatchesFirstMessage(e, oneMessage, twoMessage);
+  } else if (e.getCause() == twoException) {
+assertCauseMatchesFirstMessage(e, twoMessage, oneMessage);
+  } else {
+fail("Expected one of the causes and its message");
+  }
+}
+  }
+
+  private void assertCauseMatchesFirstMessage(UmbrellaException e, String  
firstMessage,

+  String otherMessage) {
+assertTrue("Cause should be first message", e.getMessage().startsWith(
+2 + UmbrellaException.MULTIPLE + firstMessage));
+assertTrue("Should also see the other message",  
e.getMessage().contains(otherMessage));

+  }
+}
===
---  
/trunk/user/src/com/google/web/bindery/event/shared/UmbrellaException.java	 
Mon Apr 18 16:25:25 2011
+++  
/trunk/user/src/com/google/web/bindery/event/shared/UmbrellaException.java	 
Fri Aug 26 08:45:52 2011

@@ -16,6 +16,7 @@
 package com.google.web.bindery.event.shared;

 import java.util.Collections;
+import java.util.Iterator;
 import java.util.Set;

 /**
@@ -26,15 +27,48 @@
  */
 public class UmbrellaException extends RuntimeException {

-  private static final String MSG =
-  "One or more exceptions caught, see full set in  
UmbrellaException#getCauses";

+  // Visible for testing
+  static final String MULTIPLE = " exceptions caught: ";
+
+  // Visible for testing
+  static final String ONE = "Exception caught: ";
+
+  protected static Throwable makeCause(Set causes) {
+Iterator iterator = causes.iterator();
+if (!iterator.hasNext()) {
+  return null;
+}
+
+return iterator.next();
+  }
+
+  protected static String makeMessage(Set causes) {
+int count = causes.size();
+if (count == 0) {
+  return null;
+}
+
+StringBuilder b = new StringBuilder(count == 1 ? ONE : count +  
MULTIPLE);

+boolean first = true;
+for (Throwable t : causes) {
+  if (first) {
+first = false;
+  } else {
+b.append("; ");
+  }
+  b.append(t.getMessage());
+}
+
+return b.toString();
+  }
+
   /**
* The causes of the exception.
*/
   private Set causes;

   public UmbrellaException(Set causes) {
-super(MSG, causes.size() == 0 ? n

[gwt-contrib] Re: Make UmbrellaException a bit more convenient to read, and test it. (issue1532803)

2011-08-26 Thread Ray Ryan
r10584


On Thu Aug 25 23:08:59 GMT-700 2011,  lgtm
>
> http://gwt-code-reviews.appspot.com/1532803/
>

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

[gwt-contrib] [google-web-toolkit] r10583 committed - Integrate r10431 into GWT 2.4 branch....

2011-08-26 Thread codesite-noreply

Revision: 10583
Author:   gwt.mirror...@gmail.com
Date: Fri Aug 26 08:21:06 2011
Log:  Integrate r10431 into GWT 2.4 branch.

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

Modified:
  
/releases/2.4/user/test/com/google/web/bindery/requestfactory/apt/RfValidatorTest.java


===
---  
/releases/2.4/user/test/com/google/web/bindery/requestfactory/apt/RfValidatorTest.java	 
Thu Aug 25 10:06:37 2011
+++  
/releases/2.4/user/test/com/google/web/bindery/requestfactory/apt/RfValidatorTest.java	 
Fri Aug 26 08:21:06 2011

@@ -154,6 +154,10 @@
*/
   private void testGeneratedMessages(boolean clientOnly, Class...  
classes) throws IOException {

 JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
+if (compiler == null) {
+  // This test is being run without a full JDK
+  return;
+}

 // Don't spray files in random locations
 File tempFile =  
File.createTempFile(RfValidatorTest.class.getSimpleName(), ".jar");


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


[gwt-contrib] Re: Adding a new CellTableHeaderBuilder API, which allows custom headers and footers in CellTable. C... (issue1499808)

2011-08-26 Thread jlabanca

committed as r10581

A follow up change is coming to merge the latest CellTableBuilder
changes into HeaderCreator.

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

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


Re: [gwt-contrib] maven source jars

2011-08-26 Thread Stephen Haberman

> David, could you send us (Stephen and me) your scripts so we could
> work together making this real? (if you're OK with this, Stephen)

Definitely. Sounds cool to me.

- Stephen

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


[gwt-contrib] Re: Add NoSuchMethodException to java.lang (issue1529807)

2011-08-26 Thread stephen . haberman

On 2011/08/26 17:10:50, scottb wrote:

How about "is not thrown" present tense?  No need to tie ourselves

down for all

of time. :)


Hehe, fair enough. Done.



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

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


[gwt-contrib] Re: Add NoSuchMethodException to java.lang (issue1529807)

2011-08-26 Thread stephen . haberman

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

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


[gwt-contrib] Re: Add NoSuchMethodException to java.lang (issue1529807)

2011-08-26 Thread stephen . haberman

On 2011/08/26 16:19:51, jat wrote:

The doc needs to very clearly say this will never be thrown by GWT


Agreed; done.



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

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


[gwt-contrib] Re: Add NoSuchMethodException to java.lang (issue1529807)

2011-08-26 Thread stephen . haberman

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

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


[gwt-contrib] Re: Add NoSuchMethodException to java.lang (issue1529807)

2011-08-26 Thread jat


http://gwt-code-reviews.appspot.com/1529807/diff/1/user/super/com/google/gwt/emul/java/lang/NoSuchMethodException.java
File user/super/com/google/gwt/emul/java/lang/NoSuchMethodException.java
(right):

http://gwt-code-reviews.appspot.com/1529807/diff/1/user/super/com/google/gwt/emul/java/lang/NoSuchMethodException.java#newcode21
user/super/com/google/gwt/emul/java/lang/NoSuchMethodException.java:21:
* official Java API doc for details.
The doc needs to very clearly say this will never be thrown by GWT or
any GWT libraries and is only provided for compatibility with user code
that explicitly throws or catches it.

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

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


[gwt-contrib] Re: Add NoSuchMethodException to java.lang (issue1529807)

2011-08-26 Thread stephen . haberman

I know this seems odd, given GWT doesn't support reflection, but in the
scala-library there are a few places that throw this exception even
though it's not reflection-related.

We can patch around that, but given that, in theory anyway, other users
could use this exception for non-reflection purposes as well, it doesn't
seem like a big deal to include it in the emulated java lang.

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

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


[gwt-contrib] Add NoSuchMethodException to java.lang (issue1529807)

2011-08-26 Thread stephen . haberman

Reviewers: scottb,



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

Affected files:
  A user/super/com/google/gwt/emul/java/lang/NoSuchMethodException.java


Index: user/super/com/google/gwt/emul/java/lang/NoSuchMethodException.java
diff --git  
a/user/super/com/google/gwt/emul/java/lang/NoSuchMethodException.java  
b/user/super/com/google/gwt/emul/java/lang/NoSuchMethodException.java

new file mode 100644
index  
..26285ad346b52a23581dfc72d14109db51d8b1cb

--- /dev/null
+++ b/user/super/com/google/gwt/emul/java/lang/NoSuchMethodException.java
@@ -0,0 +1,31 @@
+/*
+ * 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 java.lang;
+
+/**
+ * See + *  
href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NoSuchMethodException.html";>the

+ * official Java API doc for details.
+ */
+public class NoSuchMethodException extends Exception {
+
+  public NoSuchMethodException() {
+  }
+
+  public NoSuchMethodException(String message) {
+super(message);
+  }
+}


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


[gwt-contrib] Re: Serialization of Final Fields in RPC (issue1380807)

2011-08-26 Thread stephen . haberman



Thanks. I'll look through and incorporate your changes.


zhuyi, any updates on this?

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

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


[gwt-contrib] Re: Issue 6193: Fix memory-leak in AutoBean VM implementation (issue1401802)

2011-08-26 Thread t . broyer

Please do not use this patch. The leak is fixed in trunk by
http://code.google.com/p/google-web-toolkit/source/detail?r=10201 and
http://code.google.com/p/google-web-toolkit/source/detail?r=10344

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

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