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.

Bug 203953 - "Generate Override Methods" does not sort overloaded methods alphabetically
Summary: "Generate Override Methods" does not sort overloaded methods alphabetically
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.1
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-19 09:58 UTC by dbell
Modified: 2011-10-19 13:07 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dbell 2011-10-19 09:58:54 UTC
[ BUILD # : 201110140600 ]
[ JDK VERSION : 1.6.26 ]

To replicate:
Insert code (Ctrl + I / Alt + insert) > Override

Observed behaviour:
List of available methods to override is shown. Methods are sorted
alphabetically, but overloaded methods (i.e. methods with the same name but
different parameter types) are not sorted among themselves by param type. This
can be very problematic if one is using the Visitor pattern.

e.g.
visit(LocalSimpleType type)
visit(Union u)
visit(Enumeration e)
visit(AttributeReference agr)
...


Expected behaviour:

The above example list should be sorted alphabetically, as follows:

visit(AttributeReference agr)
visit(Enumeration e)
visit(LocalSimpleType type)
visit(Union u)
...
Comment 1 Dusan Balek 2011-10-19 13:07:26 UTC
Since NB7.1 is already feature frozen, marking as an enhancement for the next
release. Perhaps, a new option should be introduced to specify the generated methods order (see similar requirement - issue #201601.