Lipis Lipis - 3 months ago 13
Java Question

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.

Answer

In Netbeans 8.0.1:

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

Netbeans member sorting

Then:

Source -> Organize Members

Netbeans member sorting