boolean (@NotNull VirtualFile file) { // optimization: equivalent to the super method but has fewer getInfoForFile() calls WorkspaceFileInternalInfo fileInfo = myWorkspaceFileIndex.getFileInfo(file, true, true, true, false, false); if (fileInfo instanceof WorkspaceFileInternalInfo.NonWorkspace) { return false; } if (fileInfo.findFileSet(it -> it.getKind() == WorkspaceFileKind.EXTERNAL) != null && !myFileIndex.isInSourceContent(file)) { return false; } return true; }