From f50ea66fa0691efa8f27f1130b098f42e5cbe4ce Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Tue, 14 May 2019 17:37:31 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=AF=E5=88=A0=E4=BA=86sort?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/gui/itree/filetree/TemplateFileTree.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java index a76b353ab..a52e33440 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java +++ b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java @@ -17,6 +17,7 @@ import javax.swing.text.Position; import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.TreePath; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Set; @@ -228,6 +229,7 @@ public class TemplateFileTree extends EnvFileTree { if (fileNodes == null) { fileNodes = new FileNode[0]; } + Arrays.sort(fileNodes, new FileNodeComparator(FRContext.getFileNodes().getSupportedTypes())); return fileNodes; }