void (@NotNull Collection<String> outputRoots) { LocalFileSystem fs = LocalFileSystem.getInstance(); Collection<VirtualFile> toRefresh = new HashSet<>(); for (String outputRoot : outputRoots) { FileAttributes attributes = FileSystemUtil.getAttributes(FileUtil.toSystemDependentName(outputRoot)); VirtualFile vFile = fs.findFileByPath(outputRoot); if (attributes != null && vFile == null) { VirtualFile parent = fs.refreshAndFindFileByPath(PathUtil.getParentPath(outputRoot)); if (parent != null && toRefresh.add(parent)) { parent.getChildren(); } } else if (attributes == null && vFile != null || attributes != null && attributes.isDirectory() != vFile.isDirectory()) { toRefresh.add(vFile); } } if (!toRefresh.isEmpty()) { RefreshQueue.getInstance().refresh(false, false, null, toRefresh); } }