Browse Source

REPORT-8926 【10.0一轮回归】设计器默认的工作目录名称有问题

检查放到basic启动完成,切环境之前
master
ju 7 years ago
parent
commit
4741f1d050
  1. 18
      designer-base/src/com/fr/design/gui/itree/filetree/TemplateFileTree.java

18
designer-base/src/com/fr/design/gui/itree/filetree/TemplateFileTree.java

@ -1,7 +1,6 @@
package com.fr.design.gui.itree.filetree; package com.fr.design.gui.itree.filetree;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.extension.FileExtension;
import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode;
import com.fr.file.filetree.FileNode; import com.fr.file.filetree.FileNode;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
@ -104,10 +103,6 @@ public class TemplateFileTree extends EnvFileTree {
return null; return null;
} }
public FileNode[] listFile(String path) throws Exception {
return FRContext.getFileNodes().list(path);
}
/* /*
* 改变Env后,根据构造函数时设置的RootPaths,重新加载 * 改变Env后,根据构造函数时设置的RootPaths,重新加载
@ -169,24 +164,13 @@ public class TemplateFileTree extends EnvFileTree {
FileNode[] fileNodes = null; FileNode[] fileNodes = null;
try { try {
fileNodes = listFile(filePath); fileNodes = FRContext.getFileNodes().list(filePath, filter);
} catch (Exception e) { } catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
} }
if (fileNodes == null) { if (fileNodes == null) {
fileNodes = new FileNode[0]; fileNodes = new FileNode[0];
} }
// 用FileNodeFilter过滤一下
if (filter != null) {
List<FileNode> list = new ArrayList<FileNode>();
for (FileNode fileNode : fileNodes) {
if (filter.accept(fileNode)) {
list.add(fileNode);
}
}
fileNodes = list.toArray(new FileNode[list.size()]);
}
Arrays.sort(fileNodes, new FileNodeComparator()); Arrays.sort(fileNodes, new FileNodeComparator());

Loading…
Cancel
Save