void (final FilePath path) { FilePath current = path; while (current != null) { VirtualFile vf = current.getVirtualFile(); if (vf == null) { vf = LocalFileSystem.getInstance().refreshAndFindFileByPath(current.getPath()); } if (vf == null) { return; } if (!VfsUtilCore.isAncestor(myRoot, vf, true)) return; myToBeAdded.add(current); current = current.getParentPath(); } }