VirtualFile (@NotNull VirtualFile file) { WorkspaceFileSet fileSet = myWorkspaceFileIndex.findFileSetWithCustomData(file, true, true, false, true, false, ModuleOrLibrarySourceRootData.class); if (fileSet == null) return null; return fileSet.getRoot(); }