Announcement Announcement Module
Collapse
No announcement yet.
Bug: "no setter" error when Generics are used Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bug: "no setter" error when Generics are used

    SpringIDE reports "No setter found for property 'xxx' in class 'yyy' when class yyy is using a generic type:

    Example:

    public abstract class AbstractCrudDaoHibernate<E extends DomainObject>
    extends HibernateDaoSupport
    implements CrudDao<E> {
    ...
    }

    public class CustomerDaoHibernate
    extends AbstractCrudDaoHibernate<Customer>
    implements CustomerDao {
    ...
    }

    If I try to set the property "sessionFactory" which is declared in the class HibernateDaoSupport on CustomerDaoHibernate the above error is reported. Without the generic type everthing works fine.


    I´ve created an issue at http://opensource.atlassian.com/proj.../browse/IDE-43

  • #2
    Hi roman,

    I've created a ticket at http://springide.org/project/ticket/45 .
    Thanks for your report. This looks like a nice bug for Torsten to fix .

    Greetings
    Christian

    Comment


    • #3
      Originally posted by cdupuis
      This looks like a nice bug for Torsten to fix .
      Hhm, this bug is a really tough one (I didn't grasp generics by now :-().

      But anyway, to support generics we have to depend on Eclipse 3.1. IMHO we shouldn't introduce this dependency now. Let's wait for a final version of Eclipse 3.1 first before binding Spring IDE to it.

      Cheers,
      Torsten

      Comment


      • #4
        I know nothing about Eclipse plugin development or the way SpringIDE is working. So if I´m wrong, just ignore me (or give me a hint) :-)

        to support generics we have to depend on Eclipse 3.1
        Sure? I guess SpringIDE doesn´t need to know anything about generics. The setter method doesn´t use a generic type. Only the class declares one.

        Is there no Eclipse 3.0 API compliant way to ask: "Has class AA the method YY?" If there is one, SpringIDE doesn´t need to know if generics are used and should work on eclipse 3.0 and 3.1. If not, how is SpringIDE currently resolving the methods?

        I´ve viewed Erich Gamma´s presentation at JavaPolis:
        http://www.javalobby.org/av/javapoli...reen.jsp?id=34
        He said something about AST (Abstract Systax Tree) and that other plugins can use it to work with the project´s classes. Maybe it helps.

        I really would like to contribute to SpringIDE, but currently I´m working on my thesis so I don´t have the time. Sorry.

        But anyway, Thorsten and Co., thank you a lot for your great work!!!

        Best regards,

        Roman

        Comment

        Working...
        X