|
|
|
@ -16,6 +16,7 @@ import com.fr.design.mainframe.DesignerContext;
|
|
|
|
|
import com.fr.design.mainframe.DesignerFrameFileDealerPane; |
|
|
|
|
import com.fr.design.lock.LockInfoDialog; |
|
|
|
|
import com.fr.design.mainframe.JTemplate; |
|
|
|
|
import com.fr.design.mainframe.manager.search.TemplateTreeSearchManager; |
|
|
|
|
import com.fr.design.mainframe.manager.search.searcher.control.pane.TemplateSearchRemindPane; |
|
|
|
|
import com.fr.file.FILE; |
|
|
|
|
import com.fr.file.FileNodeFILE; |
|
|
|
@ -57,6 +58,9 @@ import java.util.Enumeration;
|
|
|
|
|
import java.util.Objects; |
|
|
|
|
import java.util.Observable; |
|
|
|
|
import java.util.Observer; |
|
|
|
|
import java.util.Set; |
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
import org.jetbrains.annotations.Nullable; |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -385,10 +389,15 @@ public class TemplateTreePane extends JPanel implements FileOperations {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
refreshAfterDelete(); |
|
|
|
|
Set<FileNode> deletedFileNode = deletableNodes.stream().map(treeNode -> (FileNode) treeNode.getUserObject()).collect(Collectors.toSet()); |
|
|
|
|
refreshAfterDelete(deletedFileNode); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void refreshAfterDelete() { |
|
|
|
|
private void refreshAfterDelete(Set<FileNode> deletedPaths) { |
|
|
|
|
if (TemplateTreeSearchManager.getInstance().isInSearchMode()) { |
|
|
|
|
TemplateTreeSearchManager.getInstance().deleteMatchedNode(deletedPaths); |
|
|
|
|
TemplateTreeSearchManager.getInstance().updateTemplateTree(); |
|
|
|
|
} else { |
|
|
|
|
TreePath[] paths = reportletsTree.getSelectionPaths(); |
|
|
|
|
if (paths == null) { |
|
|
|
|
reportletsTree.refresh(); |
|
|
|
@ -398,6 +407,7 @@ public class TemplateTreePane extends JPanel implements FileOperations {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private boolean deleteNodes(Collection<ExpandMutableTreeNode> nodes) { |
|
|
|
|
|
|
|
|
|