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 51af636aa2..ebbb784702 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;