void () { if (myListeners.size() == 0) return; List<VirtualFile> selection = new ArrayList<>(); final TreePath[] paths = myTree.getSelectionPaths(); if (paths != null) { for (TreePath each : paths) { VirtualFile file = getVirtualFile(each); if (file != null) { selection.add(file); } } } fireSelection(selection); }