#258 Sort files by "Type"

open
nobody
5
2005-08-12
2005-08-12
Dan Smith
No

Files, whether in normal or project mode, are sorted alphabetically.
It would often be easier to find files if they were logically grouped
according to the type of the class defined in each. While a
heavyweight approach could be used, a simple method to achieve
pretty good results would be to break the filenames into words
(based on case) and sort according to those words, starting with
the last word and moving backwards. For example, the following
hierarchy:

Fish
|--DefaultFish
|--FastFish
|--|--BlueFastFish
|--|--RedFastFish
|--CustomFish

Would alphabetically be sorted like this:
BlueFastFish.java
CustomFish.java
DefaultFish.java
FastFish.java
Fish.java
RedFastFish.java

But, under the type-sorting scheme, would be sorted like this:
Fish.java ("fish")
CustomFish.java ("fish custom")
DefaultFish.java ("fish default")
FastFish.java ("fish fast")
BlueFastFish.java ("fish fast blue")
RedFastFish.java ("fish fast red")

I'd like to see this kind of sorting as a user option. (It's possible
that the scheme would too often lead to apparently random
sorting, depending on the kinds of names that are used. I think I
generally follow a naming scheme that would sort well, though.
The java.io package would also be nicely organized; the java.lang
package wouldn't.)

Discussion