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.
[ BUILD # : RC1 ] [ JDK VERSION : 1.5.0_02 ] Code example: => SwingWorker swingWorker = new SwingWorker() { public void finished() { super.finished(); } public Object construct() { } }; => The Override MEthods diolog shows methods in this order: construct() finished() The actual order in the editor is the other way around. This is quite inconvenient as you want to code method construct() before method finished(). Also it is quite confusing as you expect the order in the editor to be the same as the order in the dialog.
Reassigning to java module for evaluation.
Methods are sorted alphabetically in the Override Methods dialog, not by the order in the source code, this is as designed. This ordering is better especially in situations when there are more methods and the user is serching for a particular method. Moreover, the displayed methods often reside in a different source file than the one the Override Methods action is invoked on. In such a case, the user usually does not have any expectations about the ordering of the methods. There could be possibly a switch in the dialog allowing to display the methods in the source order, however this is an enhancement rather than a defect.
I still feel it is confusing if the order of the methods generated in the source differs from the order in the JavaDoc as shown in the editor dialog.
OK, maybe the solution could be as follows: - the methods are displayed alphabetically in the dialog - when a group of methods is selected to be overriden, they are generated in the order that corresponds to the order in the source file the original methods reside in
I prefer to have the methods generated in the same order as in dialog "Override and implement Methods". This seems to me according to the principle of the least surprise.