Browse Source

Pull request #3230: REPORT-45895 war包部署 函数生成2份

Merge in DESIGN/design from ~LANLAN/design:release/10.0 to release/10.0

* commit 'bce740a3929954afbf1217ba2f3d4fe9ab03023b':
  改用HashMap
  改用TreeSet
  REPORT-45895 war包部署 函数生成2份
feature/big-screen
Lanlan 4 years ago
parent
commit
ffceaaa5a9
  1. 15
      designer-base/src/main/java/com/fr/design/gui/itree/filetree/EnvFileTree.java

15
designer-base/src/main/java/com/fr/design/gui/itree/filetree/EnvFileTree.java

@ -13,6 +13,8 @@ import com.fr.stable.CoreConstants;
import com.fr.stable.StableUtils;
import com.fr.workspace.WorkContext;
import java.util.HashMap;
import java.util.Map;
import javax.swing.BorderFactory;
import javax.swing.JTree;
import javax.swing.tree.DefaultTreeCellRenderer;
@ -21,7 +23,6 @@ import javax.swing.tree.TreePath;
import java.awt.Color;
import java.awt.Component;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
/*
@ -199,14 +200,14 @@ public class EnvFileTree extends RefreshableJTree {
// 用FileNodeFilter过滤一下
if (filter != null) {
java.util.List<FileNode> tList = new ArrayList<FileNode>();
for (int i = 0; i < resFns.length; i++) {
if (filter.accept(resFns[i])) {
tList.add(resFns[i]);
Map<String, FileNode> fileNodes = new HashMap<>();
for (FileNode fileNode : resFns) {
// war包部署下会生成两份classes目录,需要去重一下
if (filter.accept(fileNode)) {
fileNodes.put(fileNode.getName(), fileNode);
}
}
resFns = tList.toArray(new FileNode[tList.size()]);
resFns = fileNodes.values().toArray(new FileNode[fileNodes.size()]);
}
Arrays.sort(resFns, new FileNodeComparator(FRContext.getFileNodes().getSupportedTypes()));

Loading…
Cancel
Save