GlobalSearchScope (@NotNull Project project, @NotNull Collection<? extends VirtualFile> files, final @Nullable @Nls String displayName) { if (files.isEmpty()) return EMPTY_SCOPE; return files.size() == 1? fileScope(project, files.iterator().next(), displayName) : new FilesScope(project, files) { @Override public @NotNull String getDisplayName() { return displayName == null ? super.getDisplayName() : displayName; } }; }