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