Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I sort class members by name in NetBeans, or another Java IDE?

I want to sort members by name in the source code. Is there any easy way to do it?

I'm using NetBeans, but if there is another editor that can do that, just tell me the name of it.

like image 632
Lipis Avatar asked Oct 20 '08 00:10

Lipis


2 Answers

In Netbeans 8.0.1:

Tools -> Options -> Editor -> Formatting -> Category: Ordering

Netbeans member sorting

Then:

Source -> Organize Members

Netbeans member sorting

like image 67
Johnny Baloney Avatar answered Oct 17 '22 20:10

Johnny Baloney


Eclipse can do it.

like image 37
Paul Croarkin Avatar answered Oct 17 '22 20:10

Paul Croarkin