Thomas Broyer has submitted this change and it was merged.

Change subject: Add support for the newer bindery HandlerRegistration Bug: issue 7079 Change-Id: I80f23b094f55e40d2b2223e9f018c98c4e41a850
......................................................................


Add support for the newer bindery HandlerRegistration

Bug: issue 7079
Change-Id: I80f23b094f55e40d2b2223e9f018c98c4e41a850
---
M user/src/com/google/gwt/uibinder/rebind/HandlerEvaluator.java
M user/test/com/google/gwt/uibinder/rebind/HandlerEvaluatorTest.java
2 files changed, 4 insertions(+), 3 deletions(-)

Approvals:
  Manuel Carrasco Moñino: Looks good to me, but someone else must approve
  Leeroy Jenkins: Verified
  Thomas Broyer: Looks good to me, approved



diff --git a/user/src/com/google/gwt/uibinder/rebind/HandlerEvaluator.java b/user/src/com/google/gwt/uibinder/rebind/HandlerEvaluator.java
index 91a5c5f..cc7bc2c 100644
--- a/user/src/com/google/gwt/uibinder/rebind/HandlerEvaluator.java
+++ b/user/src/com/google/gwt/uibinder/rebind/HandlerEvaluator.java
@@ -23,9 +23,9 @@
 import com.google.gwt.core.ext.typeinfo.JType;
 import com.google.gwt.core.ext.typeinfo.TypeOracle;
 import com.google.gwt.event.shared.EventHandler;
-import com.google.gwt.event.shared.HandlerRegistration;
 import com.google.gwt.uibinder.client.UiHandler;
 import com.google.gwt.uibinder.rebind.model.OwnerClass;
+import com.google.web.bindery.event.shared.HandlerRegistration;

 /**
* This class implements an easy way to bind widget event handlers to methods
@@ -272,7 +272,8 @@
     for (JMethod method : objectType.getInheritableMethods()) {

       // Condition 1: returns HandlerRegistration?
-      if (method.getReturnType() == handlerRegistrationJClass) {
+ JClassType returnClassType = method.getReturnType().isClassOrInterface(); + if (returnClassType != null && handlerRegistrationJClass.isAssignableFrom(returnClassType)) {

         // Condition 2: single parameter of the same type of handlerType?
         JParameter[] parameters = method.getParameters();
diff --git a/user/test/com/google/gwt/uibinder/rebind/HandlerEvaluatorTest.java b/user/test/com/google/gwt/uibinder/rebind/HandlerEvaluatorTest.java
index 98de89b..c4a0b1d 100644
--- a/user/test/com/google/gwt/uibinder/rebind/HandlerEvaluatorTest.java
+++ b/user/test/com/google/gwt/uibinder/rebind/HandlerEvaluatorTest.java
@@ -19,8 +19,8 @@
 import com.google.gwt.core.ext.typeinfo.TypeOracle;
 import com.google.gwt.dev.util.log.PrintWriterTreeLogger;
 import com.google.gwt.event.shared.EventHandler;
-import com.google.gwt.event.shared.HandlerRegistration;
 import com.google.gwt.uibinder.rebind.model.OwnerClass;
+import com.google.web.bindery.event.shared.HandlerRegistration;

 import junit.framework.TestCase;


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I80f23b094f55e40d2b2223e9f018c98c4e41a850
Gerrit-PatchSet: 5
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Julien Dramaix <[email protected]>
Gerrit-Reviewer: Daniel Kurka <[email protected]>
Gerrit-Reviewer: Goktug Gokdogan <[email protected]>
Gerrit-Reviewer: Julien Dramaix <[email protected]>
Gerrit-Reviewer: Leeroy Jenkins <[email protected]>
Gerrit-Reviewer: Manuel Carrasco Moñino <[email protected]>
Gerrit-Reviewer: Matthew Dempsky <[email protected]>
Gerrit-Reviewer: Roberto Lublinerman <[email protected]>
Gerrit-Reviewer: Thomas Broyer <[email protected]>

--
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to