gwtproject / gwt

GWT Open Source Project
http://www.gwtproject.org
1.52k stars 376 forks source link

UiBinder can't recongnize parent interface's method #7870

Open dankurka opened 9 years ago

dankurka commented 9 years ago

Originally reported on Google Code with ID 7873

Found in GWT Release: 2.4.0,all  2.5.0

interface Parent extends IsWidet{
   void setText(String text);
} 

interface Child extends Parent{
  void setId(String id);
}

X.ui.xml
...
<pkg:Child text="Hello" id="yyy" ui:field="w1">
   <ui:attribute name="text" description="hello"/>
</pkg:Child>
....

(Here w1 is injected in contructor)

A compilation error will get thrown out:No method found to apply message attribute
text:

Reported by Alexander.Luya on 2012-12-30 06:02:23

dankurka commented 9 years ago
AFAICT, UiBinder was initially designed for concrete classes, which explains that behavior.
The fix should be rather easy now that JClassType has getInheritableMethods.

Reported by t.broyer on 2013-01-01 01:21:48