void (VirtualFile[] array, boolean requestFocus, boolean updatePathNeeded) { myTreeIsUpdating = true; final List<VirtualFile> fileList = Arrays.asList(array); if (!Set.of(myFileSystemTree.getSelectedFiles()).containsAll(fileList)) { myFileSystemTree.select(array, () -> { if (!myFileSystemTree.areHiddensShown() && !Set.of(myFileSystemTree.getSelectedFiles()).containsAll(fileList)) { // try to select files in hidden folders myFileSystemTree.showHiddens(true); selectInTree(array, requestFocus, updatePathNeeded); return; } if (array.length == 1 && !Set.of(myFileSystemTree.getSelectedFiles()).containsAll(fileList)) { // try to select a parent of a missed file VirtualFile parent = array[0].getParent(); if (parent != null && parent.isValid()) { selectInTree(new VirtualFile[]{parent}, requestFocus, updatePathNeeded); return; } } reportFileNotFound(); if (updatePathNeeded) { updatePathFromTree(fileList, true); } if (requestFocus) { SwingUtilities.invokeLater(() -> myFileSystemTree.getTree().requestFocus()); } }); } else { reportFileNotFound(); if (updatePathNeeded) { updatePathFromTree(fileList, true); } } }