GlobalSearchScope () { if (myProject.isDefault() || LightEdit.owns(myProject)) { return new EverythingGlobalScope(myProject); } return new ProjectAndLibrariesScope(myProject) { @Override public boolean contains(@NotNull VirtualFile file) { if (file instanceof ProjectAwareVirtualFile) { return ((ProjectAwareVirtualFile)file).isInProject(Objects.requireNonNull(getProject())); } return super.contains(file); } }; }