GlobalSearchScope (@NotNull Project project, boolean withSubdirectories, VirtualFile @NotNull ... directories) { Set<VirtualFile> dirSet = ContainerUtil.newHashSet(directories); if (dirSet.isEmpty()) { return GlobalSearchScope.EMPTY_SCOPE; } if (dirSet.size() == 1) { return directoryScope(project, dirSet.iterator().next(), withSubdirectories); } return new DirectoriesScope(project, withSubdirectories ? Collections.emptySet() : dirSet, withSubdirectories ? dirSet : Collections.emptySet()); }