From 2f759e1770dc037e5e3b74d3e8837af1984300da Mon Sep 17 00:00:00 2001 From: Hades Date: Wed, 8 May 2019 10:25:03 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-16817=20=E3=80=9010.0.3=E5=9B=9E?= =?UTF-8?q?=E5=BD=92=E3=80=91=E8=B6=85=E7=BA=A7=E9=93=BE=E6=8E=A5-?= =?UTF-8?q?=E7=BD=91=E7=BB=9C=E6=8A=A5=E8=A1=A8-=E5=8F=AF=E9=80=89?= =?UTF-8?q?=E6=8B=A9png=E7=B1=BB=E5=9E=8B=E7=9A=84=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/gui/itree/filetree/TemplateFileTree.java | 10 ++++++++++ 1 file changed, 10 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 51af636aa..ebbb78470 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 @@ -228,6 +228,16 @@ public class TemplateFileTree extends EnvFileTree { if (fileNodes == null) { fileNodes = new FileNode[0]; } + // FileNodeFilter过滤 + if (filter != null) { + List list = new ArrayList(); + for (FileNode fileNode : fileNodes) { + if (filter.accept(fileNode)) { + list.add(fileNode); + } + } + fileNodes = list.toArray(new FileNode[list.size()]); + } Arrays.sort(fileNodes, new FileNodeComparator(FRContext.getFileNodes().getSupportedTypes())); return fileNodes;