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.
Reported by a user of NB 4.0 dev build. Reliably reproducible in NB 4.0 beta 1 build. Put the following fragment of code into a source file: static class MyTest extends JButton { public MyTest() { super("Ok"); addActionListener(new ActionListener() { // *this* }); } } When i'm in the the ActionListener class (currently an empty line marked by *this* comment) and press <Ctrl>+I the popup appears with the list of the methods i can override. All of those methods are methods of JButton and there are no actionPerformed() method for the ActionListener itself.
When I tried to reproduce it, I run into Issue 47453 (NPE), marking it as a blocker for this bug.
This is a known problem. It is because Override method works on top of the old src hierarchy API which does not know anything about annonymous classes. This should be fixed as Dan rewrites the Override methods functionality to JMI.
*** Issue 45260 has been marked as a duplicate of this issue. ***
Override Methods and Synchronize actions rewritten.
Still doesn't work in custom build of 20041015 sources. Ctrl-I still shows all JButton methods, but no 'actionPerformed' for the originally reported test case.
Did you have java.awt.event.ActionListener imported in the source when you tried the action ? If this import is missing, ActionListener is just an unresolved class without any methods, thus no methods are offered in the dialog (there are only methods related to java.lang.Object). This behaviuor is not a regression, NB 3.6 requires the import to be present as well.
Ah, you're probably right. Works for me too in build #200410171800. Reopening to close as RESOLVED FIXED.
RESOLVED FIXED. The original fix seems to work fine.
Verified.