avoid empty scopes

GitOrigin-RevId: 7287d69e380322e79f532b66f28649f72c3b7de6
This commit is contained in:
Dmitry Batkovich
2020-10-22 12:10:28 +00:00
committed by intellij-monorepo-bot
parent e4948159b5
commit 474b4eafe4
@@ -213,7 +213,10 @@ public abstract class NonClasspathClassFinder extends PsiElementFinder {
List<GlobalSearchScope> nonClasspathScopes = new SmartList<>();
for (PsiElementFinder finder : EP.getExtensions(project)) {
if (finder instanceof NonClasspathClassFinder) {
nonClasspathScopes.add(NonClasspathDirectoriesScope.compose(((NonClasspathClassFinder)finder).getClassRoots()));
GlobalSearchScope scope = NonClasspathDirectoriesScope.compose(((NonClasspathClassFinder)finder).getClassRoots());
if (scope != GlobalSearchScope.EMPTY_SCOPE) {
nonClasspathScopes.add(scope);
}
}
}
if (nonClasspathScopes.isEmpty()) {