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

Summary: "Generate Override Methods" does not sort overloaded methods alphabetically
Product: java Reporter: dbell
Component: EditorAssignee: Dusan Balek <dbalek>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 7.1   
Hardware: Macintosh   
OS: Mac OS X   
Issue Type: ENHANCEMENT Exception Reporter:

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.