Use human sort order for all paths loaded into the UI

This commit is contained in:
Reinhard Pointner 2016-09-29 02:02:59 +08:00
parent 8efd30ab38
commit 1743884c17
2 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@ class TypeTool extends Tool<TreeModel> {
return new DefaultTreeModel(new FolderNode("Types", emptyList()));
}
List<File> filesAndFolders = listFiles(root, f -> true, HUMAN_ORDER);
List<File> filesAndFolders = listFiles(root, NOT_HIDDEN, HUMAN_ORDER);
List<TreeNode> groups = new ArrayList<TreeNode>();
for (Entry<String, FileFilter> it : getMetaTypes().entrySet()) {

View File

@ -789,7 +789,7 @@ public final class FileUtilities {
public static final Comparator<File> CASE_INSENSITIVE_ORDER = comparing(File::getPath, String.CASE_INSENSITIVE_ORDER);
public static final Comparator<File> HUMAN_ORDER = comparing(File::getPath, new AlphanumComparator(Locale.ENGLISH));
public static final Comparator<File> HUMAN_ORDER = comparing(File::getName, new AlphanumComparator(Locale.ENGLISH));
/**
* Dummy constructor to prevent instantiation.