views:

926

answers:

4

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.

+4  A: 

Eclipse can do it.

Paul Croarkin
+3  A: 

As @Lipis said - use eclipse, Or you can use Jalopy as part of your build which will do all manner of magical formatting to your source files in the process (whether this is a good thing or not is open to debate)

Martin
A: 

As of 6.0/6.1, this feature isn't available in the built-in tools. The "Navigator" view is intended to give you an ordered index of your members. To see the Navigator, go to Window->Navigating->Navigator or hit Control-F7.

Consider submitting a feature enhancement to Netbeans.

James Schek
+1  A: 

Netbeans lets you sort the methods in the Navigator. Personally, I never saw the point in sorting methods in the code. When possible I like to keep methods together that work together. For example, the getter() and setter(). Incremental search or being able to control-click on a method to navigate to the declaration is much more useful, IMHO.