This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Wrong method parameters in code completion for generified interfaces | ||
---|---|---|---|
Product: | java | Reporter: | m_potociar <m_potociar> |
Component: | Unsupported | Assignee: | issues@java <issues> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | jlahoda, thurka, vstejskal |
Priority: | P2 | ||
Version: | 5.x | ||
Hardware: | All | ||
OS: | Windows XP | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
m_potociar
2006-03-16 10:07:34 UTC
So the problem is after Alt+Enter and clicking "Implement all abstract methods", right? It seems that the java hints provider does not care about generics properly. The code should be in java/hints I guess ImplementMethodJavaHint. Reassigning to Vita. Adding jlahoda to cc as Honza knows the editor hints best. I've spent some time investigating the problem and here is what I found. The hint seems to work fine for normal classes no matter whether they use generics or not. However, it's broken for annonymous classes. For some reason the ClassDefinition of an annonymous class doesn't seem to know about the generics. When it's asked to return interfaces implemented by the annonymous class it simply returns interfaces without the generics type. In the example mentioned in this defect the ClassDefinition of the annonymous class returns java.lang.Comparator as the implemented interface. When the same example is used for non-annonymous class the ClassDefinition returns java.lang.Comparator<whatever.package.PolicyAssertion> JavaClass and the provided hint works fine. Now, I admit that I do not understand how the java model is implemented, but my impression is that the defect is not in the java hints provider, but in the java model implementation itself. Any pointers please? Reassigning to java module. we will look at it. The problem is in javacore. Checking in javacore/src/org/netbeans/modules/javacore/parser/MDRParser.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/parser/MDRParser.java,v <-- MDRParser.java new revision: 1.100; previous revision: 1.99 done Checking in hints/src/org/netbeans/modules/java/hints/JavaHintsProvider.java; /cvs/java/hints/src/org/netbeans/modules/java/hints/JavaHintsProvider.java,v <-- JavaHintsProvider.java new revision: 1.56; previous revision: 1.55 done Checking in hints/src/org/netbeans/modules/java/hints/JavaHintsProvider.java; /cvs/java/hints/src/org/netbeans/modules/java/hints/JavaHintsProvider.java,v <-- JavaHintsProvider.java new revision: 1.41.2.3.2.2; previous revision: 1.41.2.3.2.1 done Checking in javacore/src/org/netbeans/modules/javacore/parser/MDRParser.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/parser/MDRParser.java,v <-- MDRParser.java new revision: 1.85.6.4.2.4; previous revision: 1.85.6.4.2.3 done Reorganization of java component |