List<VirtualFile> () { final List<VirtualFile> affected = new ArrayList<>(); affected.addAll(myCreatedDirectories); affected.addAll(myWritableFiles); // after files' parent for (VirtualFile file : myMovedFiles.keySet()) { final VirtualFile parent = file.getParent(); if (parent != null) { affected.add(parent); } } // before.. for (FilePath path : myBeforePaths) { final FilePath parent = path.getParentPath(); if (parent != null) { VirtualFile parentFile = parent.getVirtualFile(); if (parentFile != null) { affected.add(parentFile); } } } return affected; }