nifkuza / gwtquery

Automatically exported from code.google.com/p/gwtquery
MIT License
0 stars 0 forks source link

The interfaces that extends Selectors cannot be extended #149

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The scenario is:
We have a MenuSelectors which extends Selectors
public interface MenuSelectors extends Selectors
{
   @Selector("#menu")
   GQuery menu();
}

Now, we have a SubMenuSelectors which extends MenuSelectors
public interface SubMenuSelectors extends MenuSelectors
{
   @Selector("#submenu")
   GQuery subMenu();
}

When compile, it complains like SubMenuSelectors_Impl doesn't have an 
implementation of menu() method.

I checked the source code that, when generating the concrete class, 
getMethods() is used. while getMethods() seems to return all the methods in 
current type, not including inherited methods.

Is it by design? Or a bug?

Thank you guys very much for such an awesome library!

Original issue reported on code.google.com by wanjunf...@gmail.com on 24 Aug 2012 at 7:08

GoogleCodeExporter commented 9 years ago
If it's a bug, it can be fixed in file SelectorGeneratorBase.java

start from line 57

      for (JMethod method : selectorType.getMethods()) {
        generateMethod(sw, method, treeLogger);
      }
      genGetAllMethod(sw, selectorType.getMethods(), treeLogger);

use selectorType.getInheritableMethods() instead of selectorType.getMethods()

Regards.

Original comment by wanjunf...@gmail.com on 24 Aug 2012 at 7:56

GoogleCodeExporter commented 9 years ago
Indeed it's a bug.
Thanks for the issue reporting and the fix

Original comment by julien.d...@gmail.com on 26 Aug 2012 at 9:34

GoogleCodeExporter commented 9 years ago
fixed with the revision r1049

Original comment by julien.d...@gmail.com on 27 Aug 2012 at 4:05

GoogleCodeExporter commented 9 years ago

Original comment by julien.d...@gmail.com on 27 Aug 2012 at 6:30

GoogleCodeExporter commented 9 years ago

Original comment by julien.d...@gmail.com on 27 Aug 2012 at 7:24

GoogleCodeExporter commented 9 years ago
Thanks for bug fixing!

When will it be available on snapshot version and release version?

Thanks!

Original comment by ke...@topcmm.com on 29 Aug 2012 at 1:55

GoogleCodeExporter commented 9 years ago
It is available in GwtQuery 1.2.0

Original comment by julien.d...@gmail.com on 29 Aug 2012 at 6:35

GoogleCodeExporter commented 9 years ago
Thank you very much!

Original comment by wanjunf...@gmail.com on 29 Aug 2012 at 6:42

GoogleCodeExporter commented 9 years ago
I'd like to ask is it possible for me to submit patches to this project?

ke...@topcmm.com is my another account. I've issued couple bugs here.

But maybe I submit some code if possible.

Original comment by wanjunf...@gmail.com on 29 Aug 2012 at 7:05

GoogleCodeExporter commented 9 years ago
Contributions is more than welcome !!
We create a contribution FAQ explaining how to submit patches : 
http://code.google.com/p/gwtquery/wiki/ContributionFAQ

Original comment by julien.d...@gmail.com on 30 Aug 2012 at 3:25