SearchScope (@NotNull Project project, @Nullable DataContext dataContext, @Nullable String scopeName) { List<? extends SearchScope> predefined = PredefinedSearchScopeProvider.getInstance().getPredefinedScopes( project, dataContext, true, false, false, false, false); for (SearchScope scope : predefined) { if (scope.getDisplayName().equals(scopeName)) { return scope; } } return ProjectScope.getProjectScope(project); }