boolean (@NotNull String pattern, @NotNull List<? extends MatchResult> group, @NotNull DirectoryPathMatcher dirMatcher) { FindSymbolParameters parameters = FindSymbolParameters.wrap(pattern, myProject, true); GlobalSearchScope scope = dirMatcher.narrowDown(parameters.getSearchScope()); FindSymbolParameters adjusted = parameters.withScope(scope); for (MatchResult matchResult : group) { for (Object o : myModel.getElementsByName(matchResult.elementName, adjusted, indicator)) { ProgressManager.checkCanceled(); if (o instanceof PsiFileSystemItem psiItem) { String qualifier = getParentPath(psiItem); if (qualifier != null) return true; } } } return false; }