public static @NotNull GlobalSearchScope addNonClasspathScope(@NotNull Project project, @NotNull GlobalSearchScope base) {
    List<GlobalSearchScope> nonClasspathScopes = new SmartList<>();
    for (PsiElementFinder finder : EP.getExtensions(project)) {
      if (finder instanceof NonClasspathClassFinder) {
        GlobalSearchScope scope = NonClasspathDirectoriesScope.compose(((NonClasspathClassFinder)finder).getClassRoots());
        if (scope != GlobalSearchScope.EMPTY_SCOPE) {
          nonClasspathScopes.add(scope);
        }
      }
    }
    if (nonClasspathScopes.isEmpty()) {
      return base;
    }
    return GlobalSearchScope.union(ArrayUtil.prepend(base, nonClasspathScopes.toArray(GlobalSearchScope.EMPTY_ARRAY)));
  }
public static @NotNull GlobalSearchScope addNonClasspathScope(@NotNull Project project, @NotNull GlobalSearchScope base)