Set<Project> (@NotNull VirtualFile file) { Project project = ProjectCoreUtil.theOnlyOpenProject(); if (project != null) { return belongsToIndexableFiles(file) ? Collections.singleton(project) : Collections.emptySet(); } else { Set<Project> projects = null; for (Pair<IndexableFileSet, Project> set : myIndexableSets) { if ((projects == null || !projects.contains(set.second)) && set.first.isInSet(file)) { if (projects == null) { projects = new SmartHashSet<>(); } projects.add(set.second); } } return ContainerUtil.notNullize(projects); } }