GlobalSearchScope () { final FileIndexFacade fileIndex = FileIndexFacade.getInstance(myProject); return new ProjectScopeImpl(myProject, fileIndex) { @Override public boolean contains(@NotNull VirtualFile file) { if (file instanceof ProjectAwareVirtualFile) { return ((ProjectAwareVirtualFile)file).isInProject(Objects.requireNonNull(getProject())); } if (file instanceof VirtualFileWindow) return true; return fileIndex.isInContent(file); } }; }