List<VirtualFile> (@NotNull Collection<? extends Path> files) { List<VirtualFile> result = new ArrayList<>(files.size()); for (Path file : files) { VirtualFile element = LocalFileSystem.getInstance().refreshAndFindFileByNioFile(file); if (element != null) { result.add(element); } } return result; }