[gwt-contrib] Change in gwt[master]: Fix binary vs. internal variable names, remove unused Name c...

2013-06-18 Thread Manuel Carrasco Moñino

Manuel Carrasco Moñino has posted comments on this change.

Change subject: Fix binary vs. internal variable names, remove unused Name  
code.

..


Patch Set 1: Code-Review+1

--
To view, visit https://gwt-review.googlesource.com/3470
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I540b1225efe7f81f0fc3ac50871cc66d1e99e753
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Stephen Haberman stephen.haber...@gmail.com
Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org
Gerrit-Reviewer: Manuel Carrasco Moñino manuel.carrasc...@gmail.com
Gerrit-Reviewer: Roberto Lublinerman rlu...@google.com
Gerrit-Reviewer: Stephen Haberman stephen.haber...@gmail.com
Gerrit-HasComments: No

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Adding key codes

2013-06-18 Thread Daniel Kurka

Daniel Kurka has uploaded a new patch set (#2).

Change subject: Adding key codes
..

Adding key codes

fixes issue 8203

Change-Id: Ia1cd903123d79db81ceb44103892e168d38a4e4e
---
M user/src/com/google/gwt/event/dom/client/KeyCodes.java
1 file changed, 345 insertions(+), 10 deletions(-)


--
To view, visit https://gwt-review.googlesource.com/3480
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia1cd903123d79db81ceb44103892e168d38a4e4e
Gerrit-PatchSet: 2
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Daniel Kurka danku...@google.com

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Adding key codes

2013-06-18 Thread Ray Cromwell

Ray Cromwell has posted comments on this change.

Change subject: Adding key codes
..


Patch Set 2: Code-Review+2

--
To view, visit https://gwt-review.googlesource.com/3480
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia1cd903123d79db81ceb44103892e168d38a4e4e
Gerrit-PatchSet: 2
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Daniel Kurka danku...@google.com
Gerrit-Reviewer: Ray Cromwell cromwell...@google.com
Gerrit-HasComments: No

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Adding key codes

2013-06-18 Thread Daniel Kurka

Daniel Kurka has uploaded a new change for review.

  https://gwt-review.googlesource.com/3480


Change subject: Adding key codes
..

Adding key codes

fixes issue 8203

Change-Id: Ia1cd903123d79db81ceb44103892e168d38a4e4e
---
M user/src/com/google/gwt/event/dom/client/KeyCodes.java
1 file changed, 345 insertions(+), 10 deletions(-)



diff --git a/user/src/com/google/gwt/event/dom/client/KeyCodes.java  
b/user/src/com/google/gwt/event/dom/client/KeyCodes.java

index 5a28ccb..be9a414 100644
--- a/user/src/com/google/gwt/event/dom/client/KeyCodes.java
+++ b/user/src/com/google/gwt/event/dom/client/KeyCodes.java
@@ -29,6 +29,213 @@
  * {@link com.google.gwt.user.client.ui.KeyboardListener}.
  */
 public class KeyCodes {
+
+  /**
+   * Key code for A
+   */
+  public static final int KEY_A = 65;
+  /**
+   * Key code for B
+   */
+  public static final int KEY_B = 66;
+  /**
+   * Key code for C
+   */
+  public static final int KEY_C = 67;
+  /**
+   * Key code for D
+   */
+  public static final int KEY_D = 68;
+  /**
+   * Key code for E
+   */
+  public static final int KEY_E = 69;
+  /**
+   * Key code for F
+   */
+  public static final int KEY_F = 70;
+  /**
+   * Key code for G
+   */
+  public static final int KEY_G = 71;
+  /**
+   * Key code for H
+   */
+  public static final int KEY_H = 72;
+  /**
+   * Key code for I
+   */
+  public static final int KEY_I = 73;
+  /**
+   * Key code for J
+   */
+  public static final int KEY_J = 74;
+  /**
+   * Key code for K
+   */
+  public static final int KEY_K = 75;
+  /**
+   * Key code for L
+   */
+  public static final int KEY_L = 76;
+  /**
+   * Key code for M
+   */
+  public static final int KEY_M = 77;
+  /**
+   * Key code for N
+   */
+  public static final int KEY_N = 78;
+  /**
+   * Key code for O
+   */
+  public static final int KEY_O = 79;
+  /**
+   * Key code for P
+   */
+  public static final int KEY_P = 80;
+  /**
+   * Key code for Q
+   */
+  public static final int KEY_Q = 81;
+  /**
+   * Key code for R
+   */
+  public static final int KEY_R = 82;
+  /**
+   * Key code for S
+   */
+  public static final int KEY_S = 83;
+  /**
+   * Key code for T
+   */
+  public static final int KEY_T = 84;
+  /**
+   * Key code for U
+   */
+  public static final int KEY_U = 85;
+  /**
+   * Key code for V
+   */
+  public static final int KEY_V = 86;
+  /**
+   * Key code for W
+   */
+  public static final int KEY_W = 87;
+  /**
+   * Key code for X
+   */
+  public static final int KEY_X = 88;
+  /**
+   * Key code for Y
+   */
+  public static final int KEY_Y = 89;
+  /**
+   * Key code for Z
+   */
+  public static final int KEY_Z = 90;
+
+  /**
+   * Key code number 0
+   */
+  public static final int KEY_ZERO = 48;
+  /**
+   * Key code number 1
+   */
+  public static final int KEY_ONE = 49;
+  /**
+   * Key code number 2
+   */
+  public static final int KEY_TWO = 50;
+  /**
+   * Key code number 3
+   */
+  public static final int KEY_THREE = 51;
+  /**
+   * Key code number 4
+   */
+  public static final int KEY_FOUR = 52;
+  /**
+   * Key code number 5
+   */
+  public static final int KEY_FIVE = 53;
+  /**
+   * Key code number 6
+   */
+  public static final int KEY_SIX = 54;
+  /**
+   * Key code number 7
+   */
+  public static final int KEY_SEVEN = 55;
+  /**
+   * Key code number 8
+   */
+  public static final int KEY_EIGHT = 56;
+  /**
+   * Key code number 9
+   */
+  public static final int KEY_NINE = 57;
+
+  /**
+   * Key code for number 0 on numeric keyboard
+   */
+  public static final int KEY_NUM_ZERO = 96;
+  /**
+   * Key code for number 1 on numeric keyboard
+   */
+  public static final int KEY_NUM_ONE = 97;
+  /**
+   * Key code for number 2 on numeric keyboard
+   */
+  public static final int KEY_NUM_TWO = 98;
+  /**
+   * Key code for number 3 on numeric keyboard
+   */
+  public static final int KEY_NUM_THREE = 99;
+  /**
+   * Key code for number 4 on numeric keyboard
+   */
+  public static final int KEY_NUM_FOUR = 100;
+  /**
+   * Key code for number 5 on numeric keyboard
+   */
+  public static final int KEY_NUM_FIVE = 101;
+  /**
+   * Key code for number 6 on numeric keyboard
+   */
+  public static final int KEY_NUM_SIX = 102;
+  /**
+   * Key code for number 7 on numeric keyboard
+   */
+  public static final int KEY_NUM_SEVEN = 103;
+  /**
+   * Key code for number 8 on numeric keyboard
+   */
+  public static final int KEY_NUM_EIGHT = 104;
+  /**
+   * Key code for number 9 on numeric keyboard
+   */
+  public static final int KEY_NUM_NINE = 105;
+  /**
+   * Key code for multiply on numeric keyboard
+   */
+  public static final int KEY_NUM_MULTIPLY = 106;
+  /**
+   * Key code for plus on numeric keyboard
+   */
+  public static final int KEY_NUM_PLUS = 107;
+  /**
+   * Key code for minus on numeric keyboard
+   */
+  public static final int KEY_NUM_MINUS = 109;
+  /**
+   * Key code for period on numeric keyboard
+   */

[gwt-contrib] Change in gwt[master]: Adding key codes

2013-06-18 Thread Daniel Kurka

Daniel Kurka has submitted this change and it was merged.

Change subject: Adding key codes
..


Adding key codes

fixes issue 8203

Change-Id: Ia1cd903123d79db81ceb44103892e168d38a4e4e
---
M user/src/com/google/gwt/event/dom/client/KeyCodes.java
1 file changed, 345 insertions(+), 10 deletions(-)

Approvals:
  Ray Cromwell: Verified; Looks good to me, approved



diff --git a/user/src/com/google/gwt/event/dom/client/KeyCodes.java  
b/user/src/com/google/gwt/event/dom/client/KeyCodes.java

index 5a28ccb..699510e 100644
--- a/user/src/com/google/gwt/event/dom/client/KeyCodes.java
+++ b/user/src/com/google/gwt/event/dom/client/KeyCodes.java
@@ -29,6 +29,213 @@
  * {@link com.google.gwt.user.client.ui.KeyboardListener}.
  */
 public class KeyCodes {
+
+  /**
+   * Key code for A
+   */
+  public static final int KEY_A = 65;
+  /**
+   * Key code for B
+   */
+  public static final int KEY_B = 66;
+  /**
+   * Key code for C
+   */
+  public static final int KEY_C = 67;
+  /**
+   * Key code for D
+   */
+  public static final int KEY_D = 68;
+  /**
+   * Key code for E
+   */
+  public static final int KEY_E = 69;
+  /**
+   * Key code for F
+   */
+  public static final int KEY_F = 70;
+  /**
+   * Key code for G
+   */
+  public static final int KEY_G = 71;
+  /**
+   * Key code for H
+   */
+  public static final int KEY_H = 72;
+  /**
+   * Key code for I
+   */
+  public static final int KEY_I = 73;
+  /**
+   * Key code for J
+   */
+  public static final int KEY_J = 74;
+  /**
+   * Key code for K
+   */
+  public static final int KEY_K = 75;
+  /**
+   * Key code for L
+   */
+  public static final int KEY_L = 76;
+  /**
+   * Key code for M
+   */
+  public static final int KEY_M = 77;
+  /**
+   * Key code for N
+   */
+  public static final int KEY_N = 78;
+  /**
+   * Key code for O
+   */
+  public static final int KEY_O = 79;
+  /**
+   * Key code for P
+   */
+  public static final int KEY_P = 80;
+  /**
+   * Key code for Q
+   */
+  public static final int KEY_Q = 81;
+  /**
+   * Key code for R
+   */
+  public static final int KEY_R = 82;
+  /**
+   * Key code for S
+   */
+  public static final int KEY_S = 83;
+  /**
+   * Key code for T
+   */
+  public static final int KEY_T = 84;
+  /**
+   * Key code for U
+   */
+  public static final int KEY_U = 85;
+  /**
+   * Key code for V
+   */
+  public static final int KEY_V = 86;
+  /**
+   * Key code for W
+   */
+  public static final int KEY_W = 87;
+  /**
+   * Key code for X
+   */
+  public static final int KEY_X = 88;
+  /**
+   * Key code for Y
+   */
+  public static final int KEY_Y = 89;
+  /**
+   * Key code for Z
+   */
+  public static final int KEY_Z = 90;
+
+  /**
+   * Key code number 0
+   */
+  public static final int KEY_ZERO = 48;
+  /**
+   * Key code number 1
+   */
+  public static final int KEY_ONE = 49;
+  /**
+   * Key code number 2
+   */
+  public static final int KEY_TWO = 50;
+  /**
+   * Key code number 3
+   */
+  public static final int KEY_THREE = 51;
+  /**
+   * Key code number 4
+   */
+  public static final int KEY_FOUR = 52;
+  /**
+   * Key code number 5
+   */
+  public static final int KEY_FIVE = 53;
+  /**
+   * Key code number 6
+   */
+  public static final int KEY_SIX = 54;
+  /**
+   * Key code number 7
+   */
+  public static final int KEY_SEVEN = 55;
+  /**
+   * Key code number 8
+   */
+  public static final int KEY_EIGHT = 56;
+  /**
+   * Key code number 9
+   */
+  public static final int KEY_NINE = 57;
+
+  /**
+   * Key code for number 0 on numeric keyboard
+   */
+  public static final int KEY_NUM_ZERO = 96;
+  /**
+   * Key code for number 1 on numeric keyboard
+   */
+  public static final int KEY_NUM_ONE = 97;
+  /**
+   * Key code for number 2 on numeric keyboard
+   */
+  public static final int KEY_NUM_TWO = 98;
+  /**
+   * Key code for number 3 on numeric keyboard
+   */
+  public static final int KEY_NUM_THREE = 99;
+  /**
+   * Key code for number 4 on numeric keyboard
+   */
+  public static final int KEY_NUM_FOUR = 100;
+  /**
+   * Key code for number 5 on numeric keyboard
+   */
+  public static final int KEY_NUM_FIVE = 101;
+  /**
+   * Key code for number 6 on numeric keyboard
+   */
+  public static final int KEY_NUM_SIX = 102;
+  /**
+   * Key code for number 7 on numeric keyboard
+   */
+  public static final int KEY_NUM_SEVEN = 103;
+  /**
+   * Key code for number 8 on numeric keyboard
+   */
+  public static final int KEY_NUM_EIGHT = 104;
+  /**
+   * Key code for number 9 on numeric keyboard
+   */
+  public static final int KEY_NUM_NINE = 105;
+  /**
+   * Key code for multiply on numeric keyboard
+   */
+  public static final int KEY_NUM_MULTIPLY = 106;
+  /**
+   * Key code for plus on numeric keyboard
+   */
+  public static final int KEY_NUM_PLUS = 107;
+  /**
+   * Key code for minus on numeric keyboard
+   */
+  public static final int KEY_NUM_MINUS = 109;
+  /**
+   * Key code for period 

[gwt-contrib] Change in gwt[master]: Add interfaces for widgets.

2013-06-18 Thread Stephen Haberman

Stephen Haberman has posted comments on this change.

Change subject: Add interfaces for widgets.
..


Patch Set 8:

doesn't fit into current IsXXX because if it was you wouldn't need  
IsWidget2 :)


My take is that it's just because IsWidget is already a public API, and  
can't have methods added to it without being a breaking change.



very common practice for testing in java


Given Java's history, I don't believe that something being common in Java  
is necessarily a good argument. :-)


Or, less cynically, mocks being common shouldn't mean they should be the  
*only* way of testing (which is how it is with GWT right now).



You cannot do what you exactly want ... in (AWT, SWT, Swing, Android)


Right, and MVP-style unit testing subsequently sucks in them as well.

Same boilerplate hell of hand-coding your own view interfaces/impls/etc.  
See some of the papers from Atomic Object.


AWT/SWT/Swing were all created before MVP/unit testing was popular in the  
Java community, so it is not surprising they were not designed with unit  
testing in mind. This is an opportunity to fix that.


Answer can be implemented by just using naming conventions (i.e. store  
x on setX and return it on getX)


That works for Style, but I've stubbed about 80-90% of the widgets, and by  
far most of the methods are not trivial based-on-the-name-implementations  
like that.


forward calls to your handwritten StubElement - which doesn't need to  
extend the StubElement.


That sounds painful as you wouldn't have any compiler support about whether  
you've implemented the right methods or not.


Also, then you can't use covariant return types to provide tests with  
test-specific helper methods on the not-really-Element StubElements.


Ironically, we are both wanting to do the same thing (do MVP directly  
against widgets), and both had to write code outside of GWT to do so  
(gwt-mockito/etc. and Tessell).


Obviously I can keep doing what I'm doing in Tessell, my assertion is just  
that these interfaces would be useful in GWT itself.


They make both mocking and stubbing easier, because then both supported  
out-of-the-box instead of having to be hacked around.


Yes, we can be annoyed that Java requires duplicating an API in interfaces  
and the implementation, but I believe that's a cost that we as Java users  
have collectively decided to carry.


So, I understand you don't have an interest in using these interfaces;  
that's fine, but myself (and at least a few others) do.


I think part of a healthy open source project is letting in changes that  
the maintainer(s) themselves may not necessarily use, but that other users  
want.


Obviously there is a balance here, and you can't let in every single  
commit. But I believe it's surprising how many patches can generally be let  
in.


For example, see the Spark project, whose maintainers, sans typical  
style/architecture issues, let in a wide range of community patches.


As a contributor (to Spark), it's very refreshing. And I believe as a  
direct consequence, Spark has a very healthy community of contributors  
(much, much more healthy than GWT for sure).


So, I very much want your feedback, Goktug, on making this patch as good as  
it can possibly be from an implementation perspective; but I'd hope you'd  
avoid -1'ing just because you personally wouldn't use it.


--
To view, visit https://gwt-review.googlesource.com/3231
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibd17162d37e367720829bcdaf9a350e446c833b9
Gerrit-PatchSet: 8
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Stephen Haberman stephen.haber...@gmail.com
Gerrit-Reviewer: Colin Alworth niloc...@gmail.com
Gerrit-Reviewer: Daniel Kurka danku...@google.com
Gerrit-Reviewer: Goktug Gokdogan gok...@google.com
Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org
Gerrit-Reviewer: Stephen Haberman stephen.haber...@gmail.com
Gerrit-Reviewer: Thomas Broyer t.bro...@gmail.com
Gerrit-HasComments: No

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Add interfaces for widgets.

2013-06-18 Thread Goktug Gokdogan

Goktug Gokdogan has posted comments on this change.

Change subject: Add interfaces for widgets.
..


Patch Set 8:

The part that I'm not comfortable with is, you can exactly have the same  
effect with the current state.


Yes you wouldn't have compiler support but I don't think you it is a big  
deal. Stub are going to be written once and you already did that. If a new  
method is added and if somebody calls it, if will fail-fast; and you can  
fix that yourself in your own code. With the interfaces, if someone forgets  
to add the new method to interface and then you will need a patch to gwt  
proper.


Being said that, rest assured, I wouldn't -1 for just not using it. My  
point was, what I suggested looked like pretty feasible and acceptable for  
your use case. If other reviewers +1's, you can go ahead submit the patch.


--
To view, visit https://gwt-review.googlesource.com/3231
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibd17162d37e367720829bcdaf9a350e446c833b9
Gerrit-PatchSet: 8
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Stephen Haberman stephen.haber...@gmail.com
Gerrit-Reviewer: Colin Alworth niloc...@gmail.com
Gerrit-Reviewer: Daniel Kurka danku...@google.com
Gerrit-Reviewer: Goktug Gokdogan gok...@google.com
Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org
Gerrit-Reviewer: Stephen Haberman stephen.haber...@gmail.com
Gerrit-Reviewer: Thomas Broyer t.bro...@gmail.com
Gerrit-HasComments: No

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Use Double.isNan(d) instead of d != d to test for NaN.

2013-06-18 Thread Matthew Dempsky

Matthew Dempsky has uploaded a new change for review.

  https://gwt-review.googlesource.com/3490


Change subject: Use Double.isNan(d) instead of d != d to test for NaN.
..

Use Double.isNan(d) instead of d != d to test for NaN.

Satisfies upcoming error-prone warnings.

Change-Id: I4dcdd53fa616712c6a5548453fae51b5713e7764
---
M dev/core/src/com/google/gwt/dev/js/rhino/ScriptRuntime.java
1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/dev/core/src/com/google/gwt/dev/js/rhino/ScriptRuntime.java  
b/dev/core/src/com/google/gwt/dev/js/rhino/ScriptRuntime.java

index df30186..d9599e3 100644
--- a/dev/core/src/com/google/gwt/dev/js/rhino/ScriptRuntime.java
+++ b/dev/core/src/com/google/gwt/dev/js/rhino/ScriptRuntime.java
@@ -52,7 +52,7 @@
 public static double NaN = 0.0d / 0.0;

 public static String numberToString(double d, int base) {
-if (d != d)
+if (Double.isNaN(d))
 return NaN;
 if (d == Double.POSITIVE_INFINITY)
 return Infinity;

--
To view, visit https://gwt-review.googlesource.com/3490
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4dcdd53fa616712c6a5548453fae51b5713e7764
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Matthew Dempsky mdemp...@google.com

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Use Double.isNaN(d) instead of d != d to test for NaN.

2013-06-18 Thread Goktug Gokdogan

Goktug Gokdogan has posted comments on this change.

Change subject: Use Double.isNaN(d) instead of d != d to test for NaN.
..


Patch Set 2: Code-Review+2

--
To view, visit https://gwt-review.googlesource.com/3490
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I4dcdd53fa616712c6a5548453fae51b5713e7764
Gerrit-PatchSet: 2
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Matthew Dempsky mdemp...@google.com
Gerrit-Reviewer: Goktug Gokdogan gok...@google.com
Gerrit-HasComments: No

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Adds Timer#isRunning().

2013-06-18 Thread Goktug Gokdogan

Goktug Gokdogan has posted comments on this change.

Change subject: Adds Timer#isRunning().
..


Patch Set 2:

Daniel, do you have any other concerns?

--
To view, visit https://gwt-review.googlesource.com/3321
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0133c64de75d5d95cff863c5ab950d474dda0c56
Gerrit-PatchSet: 2
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan gok...@google.com
Gerrit-Reviewer: Daniel Kurka danku...@google.com
Gerrit-Reviewer: Goktug Gokdogan gok...@google.com
Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org
Gerrit-HasComments: No

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Add interfaces for widgets.

2013-06-18 Thread Colin Alworth

Colin Alworth has posted comments on this change.

Change subject: Add interfaces for widgets.
..


Patch Set 8:

What is the thinking for the remaining 10%-ish of widgets - all of the cell  
widgets (except CellPanel), remaining *boxes (DateBox, various number-Box),  
RichTextArea, missing *LayoutPanels (SplitLayoutPanel, LayoutPanel,  
HeaderPanel, DeckLayoutPanel), etc? Future patch, or less important? I  
could see skipping most of the boxes, since the api should be relatively  
similar since subclasses mostly modify internal behavior, but then you have  
IsNumberLabel which just makes the generics more explicit (and should  
almost certainly be extending IsValueLabel to get those other  
super-interfaces...). Then there are the layout panels which arguably look  
like HasWidgets.ForIsWidget, but if IsElement gets so specific as to allow  
direct dom manipulation, it seems reasonable to allow layout manipulation  
as well.


AbstractHasData and subclasses (lots of cell widgets) is a nice abstract  
class which already has most -- but not all -- methods declared in various  
interfaces.


Unless we're waiting for a future patch to finish the job, I'm not yet  
understanding the approach in which classes get selected for this treatment  
and which types/methods get a pass. I don't mean for this to stand in the  
way of this patch, but to suggest that the strategy is sufficiently unclear  
that we could probably use a gwt-site doc on this or a body of javadoc that  
covers how these are intended to be used, and how widget  
authors/maintainers should behave to make their code usable by downstream  
users who like these interfaces for testing.


--
To view, visit https://gwt-review.googlesource.com/3231
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibd17162d37e367720829bcdaf9a350e446c833b9
Gerrit-PatchSet: 8
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Stephen Haberman stephen.haber...@gmail.com
Gerrit-Reviewer: Colin Alworth niloc...@gmail.com
Gerrit-Reviewer: Daniel Kurka danku...@google.com
Gerrit-Reviewer: Goktug Gokdogan gok...@google.com
Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org
Gerrit-Reviewer: Stephen Haberman stephen.haber...@gmail.com
Gerrit-Reviewer: Thomas Broyer t.bro...@gmail.com
Gerrit-HasComments: No

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Fixes UiHandler method matching in generic classes

2013-06-18 Thread Goktug Gokdogan

Goktug Gokdogan has submitted this change and it was merged.

Change subject: Fixes UiHandler method matching in generic classes
..


Fixes UiHandler method matching in generic classes

Method matching in UiHandler is completely broken for generic
ui fields as FieldWriterOfExistingType is using the raw type
of the ui field. Raw type of a generic field erases all generics
from the method signature. This was causing type parameter information
to be not used while matching methods. This is a huge problem with
some common events like SelectEvent and ValueChangeEvent.

We were not hitting the problem in some cases because JRawType is
broken and doesn't correctly delete the generics from the signature
of parent methods. However that was causing another problem:
UiBinder uses the type information for ui.xml so it doesn't really
know the type parameters so it can't match generics methods from the
parent class (Issue 6091).

This fix changes the UiBinder generator so that
 - it will enhance the type information if there is a @uifield declaration
 - it will not use raw type in FieldWriterOfExistingType
 - it will fallback to erase type if it can't find any method match

Bugs: Issue 6091

Change-Id: I3121542b6eb4f06f36b88b02006b155422c45726
Review-Link: https://gwt-review.googlesource.com/#/c/3250/
---
M user/src/com/google/gwt/uibinder/rebind/FieldWriterOfExistingType.java
M user/src/com/google/gwt/uibinder/rebind/HandlerEvaluator.java
M  
user/test/com/google/gwt/uibinder/rebind/FieldWriterOfExistingTypeTest.java
A  
user/test/com/google/gwt/uibinder/test/client/ExtendsValueChangeWidget.java

M user/test/com/google/gwt/uibinder/test/client/UiHandlerTest.java
A user/test/com/google/gwt/uibinder/test/client/ValueChangeWidget.java
M user/test/com/google/gwt/uibinder/test/client/WidgetBasedUi.java
M user/test/com/google/gwt/uibinder/test/client/WidgetBasedUi.ui.xml
D  
user/test/com/google/gwt/uibinder/test/client/WildcardValueChangeWidget.java

9 files changed, 238 insertions(+), 153 deletions(-)

Approvals:
  Roberto Lublinerman: Looks good to me, approved
  Leeroy Jenkins: Verified



diff --git  
a/user/src/com/google/gwt/uibinder/rebind/FieldWriterOfExistingType.java  
b/user/src/com/google/gwt/uibinder/rebind/FieldWriterOfExistingType.java

index c6d8a35..46e5b73 100644
--- a/user/src/com/google/gwt/uibinder/rebind/FieldWriterOfExistingType.java
+++ b/user/src/com/google/gwt/uibinder/rebind/FieldWriterOfExistingType.java
@@ -16,7 +16,6 @@
 package com.google.gwt.uibinder.rebind;

 import com.google.gwt.core.ext.typeinfo.JClassType;
-import com.google.gwt.core.ext.typeinfo.JGenericType;

 /**
  * Implementation of FieldWriter for fields whose type already exists  
(that is,

@@ -33,12 +32,6 @@
 if (type == null) {
   throw new IllegalArgumentException(type cannot be null);
 }
-
-JGenericType genericType = type.isGenericType();
-if (genericType != null) {
-  type = genericType.getRawType();
-}
-
 this.type = type;
   }

diff --git a/user/src/com/google/gwt/uibinder/rebind/HandlerEvaluator.java  
b/user/src/com/google/gwt/uibinder/rebind/HandlerEvaluator.java

index cc7bc2c..a2fd077 100644
--- a/user/src/com/google/gwt/uibinder/rebind/HandlerEvaluator.java
+++ b/user/src/com/google/gwt/uibinder/rebind/HandlerEvaluator.java
@@ -25,6 +25,7 @@
 import com.google.gwt.event.shared.EventHandler;
 import com.google.gwt.uibinder.client.UiHandler;
 import com.google.gwt.uibinder.rebind.model.OwnerClass;
+import com.google.gwt.uibinder.rebind.model.OwnerField;
 import com.google.web.bindery.event.shared.HandlerRegistration;

 /**
@@ -153,10 +154,13 @@
   (Method '%s' can not be bound. You probably missed  
ui:field='%s' 

   + in the template.), boundMethod, objectName);
 }
+JClassType objectType = fieldWriter.getInstantiableType();
+if (objectType.isGenericType() != null) {
+  objectType = tryEnhancingTypeInfo(objectName, objectType);
+}

 // Retrieves the add handler method in the object.
-JMethod addHandlerMethodType = getAddHandlerMethodForObject(
-fieldWriter.getInstantiableType(), handlerType);
+JMethod addHandlerMethodType =  
getAddHandlerMethodForObject(objectType, handlerType);

 if (addHandlerMethodType == null) {
   logger.die(Field '%s' does not have an 'add%s' method  
associated.,

   objectName, handlerType.getName());
@@ -167,6 +171,23 @@
 addHandlerMethodType.getName(), objectName);
   }
 }
+  }
+
+  private JClassType tryEnhancingTypeInfo(String objectName, JClassType  
objectType) {

+OwnerField uiField = ownerClass.getUiField(objectName);
+if (uiField != null) {
+  JParameterizedType pType = uiField.getRawType().isParameterized();
+  if (pType != null) {
+// Even field is parameterized, it might be a super class. In that  
case, if 

[gwt-contrib] Change in gwt[master]: Adds an accessor to original throwable from SerializableThro...

2013-06-18 Thread Goktug Gokdogan

Goktug Gokdogan has uploaded a new change for review.

  https://gwt-review.googlesource.com/3500


Change subject: Adds an accessor to original throwable from  
SerializableThrowable.

..

Adds an accessor to original throwable from SerializableThrowable.

This provides ability for client side code (e.g. a client log handler)
to look into the original throwable.

Change-Id: I6856ca06f85af0165eea5ff6ac3015081b579352
---
M user/src/com/google/gwt/core/shared/SerializableThrowable.java
1 file changed, 21 insertions(+), 1 deletion(-)



diff --git a/user/src/com/google/gwt/core/shared/SerializableThrowable.java  
b/user/src/com/google/gwt/core/shared/SerializableThrowable.java

index cbbd612..03e993e 100644
--- a/user/src/com/google/gwt/core/shared/SerializableThrowable.java
+++ b/user/src/com/google/gwt/core/shared/SerializableThrowable.java
@@ -55,6 +55,7 @@

   private String typeName;
   private boolean exactTypeKnown;
+  private transient Throwable originalThrowable;
   private StackTraceElement[] dummyFieldToIncludeTheTypeInSerialization;

   /**
@@ -95,7 +96,7 @@
   }

   /**
-   * Return {@code true} if provided type name is the exact type of the  
throwable that is designed
+   * Return {@code true} if provided type name is the exact type of the  
throwable that is designated
* by this instance. This can return {@code false} if the class metadata  
is not available in the
* runtime. In that case {@link #getDesignatedType()} will return the  
type resolved by best-effort
* and may not be the exact type; instead it can be one of the ancestors  
of the real type that

@@ -115,6 +116,24 @@
 return super.initCause(fromThrowable(cause));
   }

+  /**
+   * Set the original throwable that this serializable throwable is  
derived from. Note that,
+   * original throwable is kept in a transient field; that is it will not  
be transferred to server

+   * side.
+   */
+  public void setOriginalThrowable(Throwable originalThrowable) {
+this.originalThrowable = originalThrowable;
+  }
+
+  /**
+   * Returns the original throwable that this serializable throwable is  
derived from. Note that,
+   * original throwable is kept in a transient field; that is; it will not  
be transferred to server

+   * side. In that case this method will return {@code null}.
+   */
+  public Throwable getOriginalThrowable() {
+return originalThrowable;
+  }
+
   @Override
   public String toString() {
 String type = exactTypeKnown ? typeName : (typeName + (EXACT TYPE  
UNKNOWN));

@@ -126,6 +145,7 @@
 SerializableThrowable throwable = new SerializableThrowable(null,  
t.getMessage());

 throwable.setStackTrace(t.getStackTrace());
 throwable.initCause(t.getCause());
+throwable.setOriginalThrowable(t);
 ThrowableTypeResolver.resolveDesignatedType(throwable, t);
 return throwable;
   }

--
To view, visit https://gwt-review.googlesource.com/3500
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6856ca06f85af0165eea5ff6ac3015081b579352
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan gok...@google.com

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Fixes GWT.runAsync that was broken in a recent patch.

2013-06-18 Thread Goktug Gokdogan

Goktug Gokdogan has uploaded a new change for review.

  https://gwt-review.googlesource.com/3510


Change subject: Fixes GWT.runAsync that was broken in a recent patch.
..

Fixes GWT.runAsync that was broken in a recent patch.

This is a regression to my previous change to GWT.runAsync to make it always
run async.
In the previous patch, GWT.runAsync was calling overloaded GWT.runAsync that
is treated as a split point itself. Apparently, it was treated as a split
point before the code was replaced for production mode.

This patch avoids the problem by delegating both runAsync calls to a helper
method.

Change-Id: If396a7f72ac533b304daf4d8afd8684d25e018ba
---
M user/src/com/google/gwt/core/client/GWT.java
1 file changed, 7 insertions(+), 2 deletions(-)



diff --git a/user/src/com/google/gwt/core/client/GWT.java  
b/user/src/com/google/gwt/core/client/GWT.java

index 3d3440d..6216e27 100644
--- a/user/src/com/google/gwt/core/client/GWT.java
+++ b/user/src/com/google/gwt/core/client/GWT.java
@@ -258,14 +258,19 @@
* should use the same name.
*/
   @SuppressWarnings(unused) // parameter will be used following  
replacement

-  public static void runAsync(Class? name, RunAsyncCallback callback) {
-runAsync(callback);
+  public static void runAsync(Class? name, final RunAsyncCallback  
callback) {

+runAsyncImpl(callback);
   }
+

   /**
* Run the specified callback once the necessary code for it has been  
loaded.

*/
   public static void runAsync(final RunAsyncCallback callback) {
+runAsyncImpl(callback);
+  }
+
+  private static void runAsyncImpl(final RunAsyncCallback callback) {
 Scheduler.get().scheduleDeferred(new ScheduledCommand() {
   @Override public void execute() {
 callback.onSuccess();

--
To view, visit https://gwt-review.googlesource.com/3510
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If396a7f72ac533b304daf4d8afd8684d25e018ba
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan gok...@google.com

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Adds an accessor to original throwable from SerializableThro...

2013-06-18 Thread Brian Slesinsky

Brian Slesinsky has posted comments on this change.

Change subject: Adds an accessor to original throwable from  
SerializableThrowable.

..


Patch Set 1: Code-Review+1

(1 comment)

Seems basically okay.


File user/src/com/google/gwt/core/shared/SerializableThrowable.java
Line 124:   public void setOriginalThrowable(Throwable originalThrowable) {
When would someone use the setter?


--
To view, visit https://gwt-review.googlesource.com/3500
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6856ca06f85af0165eea5ff6ac3015081b579352
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan gok...@google.com
Gerrit-Reviewer: Brian Slesinsky skybr...@google.com
Gerrit-HasComments: Yes

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Adds an accessor to original throwable from SerializableThro...

2013-06-18 Thread Goktug Gokdogan

Goktug Gokdogan has posted comments on this change.

Change subject: Adds an accessor to original throwable from  
SerializableThrowable.

..


Patch Set 1:

(1 comment)


File user/src/com/google/gwt/core/shared/SerializableThrowable.java
Line 124:   public void setOriginalThrowable(Throwable originalThrowable) {
The constructor was public (I can't remember why) so that was the reason I  
provided the setter but I can remove and wait until someone asks for it?



--
To view, visit https://gwt-review.googlesource.com/3500
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6856ca06f85af0165eea5ff6ac3015081b579352
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan gok...@google.com
Gerrit-Reviewer: Brian Slesinsky skybr...@google.com
Gerrit-Reviewer: Goktug Gokdogan gok...@google.com
Gerrit-HasComments: Yes

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Adds an accessor to original throwable from SerializableThro...

2013-06-18 Thread Goktug Gokdogan

Hello Leeroy Jenkins, Brian Slesinsky,

I'd like you to reexamine a change.  Please visit

https://gwt-review.googlesource.com/3500

to look at the new patch set (#2).

Change subject: Adds an accessor to original throwable from  
SerializableThrowable.

..

Adds an accessor to original throwable from SerializableThrowable.

This provides ability for client side code (e.g. a client log handler)
to look into the original throwable.

Change-Id: I6856ca06f85af0165eea5ff6ac3015081b579352
Review-Link: https://gwt-review.googlesource.com/#/c/3500/
---
M user/src/com/google/gwt/core/shared/SerializableThrowable.java
1 file changed, 12 insertions(+), 1 deletion(-)


--
To view, visit https://gwt-review.googlesource.com/3500
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6856ca06f85af0165eea5ff6ac3015081b579352
Gerrit-PatchSet: 2
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan gok...@google.com
Gerrit-Reviewer: Brian Slesinsky skybr...@google.com
Gerrit-Reviewer: Goktug Gokdogan gok...@google.com
Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Adds Element#toggleClassName.

2013-06-18 Thread Goktug Gokdogan

Goktug Gokdogan has uploaded a new change for review.

  https://gwt-review.googlesource.com/3501


Change subject: Adds Element#toggleClassName.
..

Adds Element#toggleClassName.

Change-Id: I1b2a507d5ee8482a91aae28c9dc9a6b6826afb2f
---
M user/src/com/google/gwt/dom/client/Element.java
M user/test/com/google/gwt/dom/client/ElementTest.java
2 files changed, 46 insertions(+), 8 deletions(-)



diff --git a/user/src/com/google/gwt/dom/client/Element.java  
b/user/src/com/google/gwt/dom/client/Element.java

index c801f5d..6232db6 100644
--- a/user/src/com/google/gwt/dom/client/Element.java
+++ b/user/src/com/google/gwt/dom/client/Element.java
@@ -595,6 +595,18 @@
   }

   /**
+   * Add the class name if it doesn't exist or removes it if does.
+   *
+   * @param className the class name to be toggled
+   */
+  public final void toggleClassName(String className) {
+boolean added = addClassName(className);
+if (!added) {
+  removeClassName(className);
+}
+  }
+
+  /**
* Replace one class name with another.
*
* @param oldClassName the class name to be replaced
diff --git a/user/test/com/google/gwt/dom/client/ElementTest.java  
b/user/test/com/google/gwt/dom/client/ElementTest.java

index 911d788..c4a2acf 100644
--- a/user/test/com/google/gwt/dom/client/ElementTest.java
+++ b/user/test/com/google/gwt/dom/client/ElementTest.java
@@ -34,11 +34,9 @@
 return com.google.gwt.dom.DOMTest;
   }

-  public void testAddRemoveReplaceHasClassName() {
+  public void testAddClassName() {
 DivElement div = Document.get().createDivElement();
-
 div.setClassName(foo);
-assertEquals(foo, div.getClassName());

 assertTrue(div.addClassName(bar));
 assertEquals(foo bar, div.getClassName());
@@ -48,12 +46,13 @@

 assertFalse(div.addClassName(baz));
 assertEquals(foo bar baz, div.getClassName());
+  }

-div.replaceClassName(bar, tintin);
-assertTrue(div.getClassName().contains(tintin));
-assertFalse(div.getClassName().contains(bar));
+  public void testRemoveClassName() {
+DivElement div = Document.get().createDivElement();
+div.setClassName(foo bar baz);

-assertTrue(div.removeClassName(tintin));
+assertTrue(div.removeClassName(bar));
 assertEquals(foo baz, div.getClassName());

 assertFalse(div.removeClassName(bar));
@@ -64,15 +63,42 @@

 assertTrue(div.removeClassName(foo));
 assertEquals(, div.getClassName());
+  }

+  public void testHasClassName() {
+DivElement div = Document.get().createDivElement();
 div.setClassName(foo bar);
+
 assertTrue(div.hasClassName(bar));
 assertTrue(div.hasClassName(foo));
-div.removeClassName(foo);
+
+div.setClassName(bar);
 assertFalse(div.hasClassName(foo));
 assertTrue(div.hasClassName(bar));
   }

+  public void testToggleClassName() {
+DivElement div = Document.get().createDivElement();
+div.setClassName(foo bar baz);
+
+div.toggleClassName(bar);
+assertEquals(foo baz, div.getClassName());
+
+div.toggleClassName(bar);
+assertEquals(foo baz bar, div.getClassName());
+  }
+
+  public void testReplaceClassName() {
+DivElement div = Document.get().createDivElement();
+div.setClassName(foo bar baz);
+
+div.replaceClassName(bar, tintin);
+assertEquals(foo baz tintin, div.getClassName());
+
+div.replaceClassName(bar, tintin2);
+assertEquals(foo baz tintin tintin2, div.getClassName());
+  }
+
   public void testIndexOfName() {
 assertEquals(-1, Element.indexOfName(, foo));


--
To view, visit https://gwt-review.googlesource.com/3501
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1b2a507d5ee8482a91aae28c9dc9a6b6826afb2f
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan gok...@google.com

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Adds an accessor to original throwable from SerializableThro...

2013-06-18 Thread Brian Slesinsky

Brian Slesinsky has posted comments on this change.

Change subject: Adds an accessor to original throwable from  
SerializableThrowable.

..


Patch Set 2: Code-Review+2

(1 comment)


File user/src/com/google/gwt/core/shared/SerializableThrowable.java
Line 120:* Returns the original throwable that this serializable  
throwable is derived from. Note that,

Note that the


--
To view, visit https://gwt-review.googlesource.com/3500
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6856ca06f85af0165eea5ff6ac3015081b579352
Gerrit-PatchSet: 2
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan gok...@google.com
Gerrit-Reviewer: Brian Slesinsky skybr...@google.com
Gerrit-Reviewer: Goktug Gokdogan gok...@google.com
Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org
Gerrit-HasComments: Yes

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Adds an accessor to original throwable from SerializableThro...

2013-06-18 Thread Goktug Gokdogan

Hello Leeroy Jenkins, Brian Slesinsky,

I'd like you to reexamine a change.  Please visit

https://gwt-review.googlesource.com/3500

to look at the new patch set (#3).

Change subject: Adds an accessor to original throwable from  
SerializableThrowable.

..

Adds an accessor to original throwable from SerializableThrowable.

This provides ability for client side code (e.g. a client log handler)
to look into the original throwable.

Change-Id: I6856ca06f85af0165eea5ff6ac3015081b579352
Review-Link: https://gwt-review.googlesource.com/#/c/3500/
---
M user/src/com/google/gwt/core/shared/SerializableThrowable.java
1 file changed, 12 insertions(+), 1 deletion(-)


--
To view, visit https://gwt-review.googlesource.com/3500
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6856ca06f85af0165eea5ff6ac3015081b579352
Gerrit-PatchSet: 3
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan gok...@google.com
Gerrit-Reviewer: Brian Slesinsky skybr...@google.com
Gerrit-Reviewer: Goktug Gokdogan gok...@google.com
Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Adds Node#removeAllChildren.

2013-06-18 Thread Goktug Gokdogan

Goktug Gokdogan has uploaded a new change for review.

  https://gwt-review.googlesource.com/3511


Change subject: Adds Node#removeAllChildren.
..

Adds Node#removeAllChildren.

Change-Id: Ic607bf6523a41c0ee4020a12e8505b1d8b39d916
---
M user/src/com/google/gwt/dom/client/Node.java
M user/test/com/google/gwt/dom/client/NodeTest.java
2 files changed, 28 insertions(+), 2 deletions(-)



diff --git a/user/src/com/google/gwt/dom/client/Node.java  
b/user/src/com/google/gwt/dom/client/Node.java

index 7433829..0f34f1e 100644
--- a/user/src/com/google/gwt/dom/client/Node.java
+++ b/user/src/com/google/gwt/dom/client/Node.java
@@ -292,6 +292,15 @@
   }-*/;

   /**
+   * Remove all children of the node.
+   */
+  public final native Node removeAllChildren() /*-{
+while (this.lastChild) {
+  this.removeChild(this.lastChild);
+}
+  }-*/;
+
+  /**
* Removes this node from its parent node if it is attached to one.
*/
   public final void removeFromParent() {
diff --git a/user/test/com/google/gwt/dom/client/NodeTest.java  
b/user/test/com/google/gwt/dom/client/NodeTest.java

index fe9935f..eddaf4b 100644
--- a/user/test/com/google/gwt/dom/client/NodeTest.java
+++ b/user/test/com/google/gwt/dom/client/NodeTest.java
@@ -40,7 +40,7 @@
 // divfoobutton/bar/div
 DivElement div = doc.createDivElement();
 Text txt0 = doc.createTextNode(foo);
-ButtonElement btn0 = doc.createButtonElement();
+ButtonElement btn0 = doc.createPushButtonElement();
 Text txt1 = doc.createTextNode(bar);

 body.appendChild(div);
@@ -49,7 +49,7 @@
 div.appendChild(txt1);

 // appendChild, insertBefore
-ButtonElement btn1 = doc.createButtonElement();
+ButtonElement btn1 = doc.createPushButtonElement();

 // divfoobtn0/barbtn1//div
 div.appendChild(btn1);
@@ -88,6 +88,23 @@
 assertEquals(txt0, div.getFirstChild());
   }

+  public void testRemoveAllChildren() throws Exception {
+Document doc = Document.get();
+BodyElement body = doc.getBody();
+
+DivElement div = doc.createDivElement();
+div.appendChild(doc.createTextNode(foo));
+div.appendChild(doc.createAnchorElement());
+div.appendChild(doc.createTextNode(bar));
+body.appendChild(div);
+
+assertEquals(fooa/abar, div.getInnerHTML());
+
+div.removeAllChildren();
+assertEquals(, div.getInnerHTML());
+assertEquals(0, div.getChildCount());
+  }
+
   /**
* setAttribute, getAttribute, hasAttributes, hasAttribute.
*/

--
To view, visit https://gwt-review.googlesource.com/3511
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic607bf6523a41c0ee4020a12e8505b1d8b39d916
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan gok...@google.com

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Move StackTraceDeobfuscator from core.server.impl to core.se...

2013-06-18 Thread Goktug Gokdogan

Goktug Gokdogan has uploaded a new change for review.

  https://gwt-review.googlesource.com/3512


Change subject: Move StackTraceDeobfuscator from core.server.impl to  
core.server.

..

Move StackTraceDeobfuscator from core.server.impl to core.server.

This patch moves StackTraceDeobfuscator to core.server as the API is  
finalized.


Change-Id: Ic84f3b2210e3c40f0f7dc41bdeea9d13bf1a4dc6
---
D user/src/com/google/gwt/core/server/impl/StackTraceDeobfuscator.java
M user/src/com/google/gwt/junit/server/JUnitHostImpl.java
M user/src/com/google/gwt/logging/server/RemoteLoggingServiceImpl.java
M user/src/com/google/gwt/logging/server/RemoteLoggingServiceUtil.java
M user/src/com/google/gwt/logging/server/StackTraceDeobfuscator.java
M user/src/com/google/web/bindery/requestfactory/server/Logging.java
M user/test/com/google/gwt/user/server/rpc/LoggingRPCTestServiceImpl.java
7 files changed, 6 insertions(+), 442 deletions(-)



diff --git  
a/user/src/com/google/gwt/core/server/impl/StackTraceDeobfuscator.java  
b/user/src/com/google/gwt/core/server/impl/StackTraceDeobfuscator.java

deleted file mode 100644
index 2d62b5c..000
--- a/user/src/com/google/gwt/core/server/impl/StackTraceDeobfuscator.java
+++ /dev/null
@@ -1,436 +0,0 @@
-/*
- * Copyright 2013 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.core.server.impl;
-
-import  
com.google.gwt.thirdparty.debugging.sourcemap.SourceMapConsumerFactory;

-import com.google.gwt.thirdparty.debugging.sourcemap.SourceMapping;
-import com.google.gwt.thirdparty.debugging.sourcemap.proto.Mapping;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Scanner;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * Deobfuscates stack traces on the server side. This class requires that  
you have turned on
- * emulated stack traces, via codelt;set-property  
name=compiler.stackMode value=emulated
- * /gt;/code in your code.gwt.xml/code module file for browsers  
that don't support
- * sourcemaps or codelt;set-property name=compiler.useSourceMaps  
value=true/gt;/code for
- * browsers that support it (e.g. Chrome), and moved your symbol map files  
to a location accessible
- * by your server-side code. You can use the GWT compiler  
code-deploy/code command line
- * argument to specify the location of the folder into which the generated  
codesymbolMaps/code
- * directory is written. By default, the final codesymbolMaps/code  
directory is

- * codewar/WEB-INF/deploy/iyourmodulename/i/symbolMaps//code.
- */
-public abstract class StackTraceDeobfuscator {
-
-  /**
-   * Creates a deobfuscator that loads symbol and source map files under  
given resource path. Uses

-   * StackTraceObfuscator's {@link ClassLoader}.
-   */
-  public static StackTraceDeobfuscator fromResource(String symbolMapsPath)  
{
-final String basePath = symbolMapsPath.endsWith(/) ?  
symbolMapsPath : symbolMapsPath + /;
-final ClassLoader classLoader =  
StackTraceDeobfuscator.class.getClassLoader();

-return new StackTraceDeobfuscator() {
-  protected InputStream openInputStream(String fileName) throws  
IOException {

-String filePath = basePath + fileName;
-InputStream inputStream =  
classLoader.getResourceAsStream(filePath);

-if (inputStream == null) {
-  throw new IOException(Missing resource:  + filePath);
-}
-return inputStream;
-  }
-};
-  }
-
-  /**
-   * Creates a deobfuscator that loads symbol and source map files from  
the given directory.

-   */
-  public static StackTraceDeobfuscator fromFileSystem(final String  
symbolMapsDirectory) {

-return new StackTraceDeobfuscator() {
-  protected InputStream openInputStream(String fileName) throws  
IOException {
-return new FileInputStream(new File(symbolMapsDirectory,  
fileName));

-  }
-};
-  }
-
-  /**
-   * Creates a deobfuscator that loads symbol and source map files beneath  
the given URL.

-   */
-  public static StackTraceDeobfuscator fromUrl(final URL urlPath) {
-return new 

[gwt-contrib] Change in gwt[master]: Add interfaces for widgets.

2013-06-18 Thread Stephen Haberman

Stephen Haberman has posted comments on this change.

Change subject: Add interfaces for widgets.
..


Patch Set 8:

Hi Colin, the only approach in selecting classes is that these are what I'd  
used so far, plus a few others.


For the remaining 10%-ish, I could add the low-hanging fruit in this CL,  
but I could also see adding them lazily/in a future patch. Either way I  
would anticipate having them eventually.


Good catch on IsNumberLabel not extending IsValueLabel; fixed (but not  
uploaded yet).


Adding documentation/guidelines is a good idea; assuming/after this gets  
+2'd (but before a release), I'll add something to the gwt site.


--
To view, visit https://gwt-review.googlesource.com/3231
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibd17162d37e367720829bcdaf9a350e446c833b9
Gerrit-PatchSet: 8
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Stephen Haberman stephen.haber...@gmail.com
Gerrit-Reviewer: Colin Alworth niloc...@gmail.com
Gerrit-Reviewer: Daniel Kurka danku...@google.com
Gerrit-Reviewer: Goktug Gokdogan gok...@google.com
Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org
Gerrit-Reviewer: Stephen Haberman stephen.haber...@gmail.com
Gerrit-Reviewer: Thomas Broyer t.bro...@gmail.com
Gerrit-HasComments: No

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Adds Node#removeAllChildren.

2013-06-18 Thread Daniel Kurka

Daniel Kurka has posted comments on this change.

Change subject: Adds Node#removeAllChildren.
..


Patch Set 1:

(3 comments)


File user/src/com/google/gwt/dom/client/Node.java
Line 303:   /**
Is there a reason to do this in JSNI, instead of Java?



File user/test/com/google/gwt/dom/client/NodeTest.java
Line 43: ButtonElement btn0 = doc.createPushButtonElement();
why did you change this?


Line 52: ButtonElement btn1 = doc.createPushButtonElement();
same here


--
To view, visit https://gwt-review.googlesource.com/3511
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic607bf6523a41c0ee4020a12e8505b1d8b39d916
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan gok...@google.com
Gerrit-Reviewer: Daniel Kurka danku...@google.com
Gerrit-HasComments: Yes

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Add interfaces for widgets.

2013-06-18 Thread Stephen Haberman

Stephen Haberman has posted comments on this change.

Change subject: Add interfaces for widgets.
..


Patch Set 8:

Hi Goktug,


Being said that, rest assured, I wouldn't -1 for just not using it.


Good, good--sorry if I got a bit long winded.

I do appreciate your feedback, and have spent several episodes mulling over  
how I could abuse Java to get widget stubs working as I'd like.


I certainly want to avoid these interfaces becoming the next Request  
Factory, which in 2 years we end up regretting having gotten into GWT core.


I'll play around a little bit.

--
To view, visit https://gwt-review.googlesource.com/3231
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibd17162d37e367720829bcdaf9a350e446c833b9
Gerrit-PatchSet: 8
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Stephen Haberman stephen.haber...@gmail.com
Gerrit-Reviewer: Colin Alworth niloc...@gmail.com
Gerrit-Reviewer: Daniel Kurka danku...@google.com
Gerrit-Reviewer: Goktug Gokdogan gok...@google.com
Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org
Gerrit-Reviewer: Stephen Haberman stephen.haber...@gmail.com
Gerrit-Reviewer: Thomas Broyer t.bro...@gmail.com
Gerrit-HasComments: No

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Adds Element#toggleClassName.

2013-06-18 Thread Daniel Kurka

Daniel Kurka has posted comments on this change.

Change subject: Adds Element#toggleClassName.
..


Patch Set 1: Code-Review+2

--
To view, visit https://gwt-review.googlesource.com/3501
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I1b2a507d5ee8482a91aae28c9dc9a6b6826afb2f
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan gok...@google.com
Gerrit-Reviewer: Daniel Kurka danku...@google.com
Gerrit-HasComments: No

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.