Collection<PsiElement> (@NotNull PsiElement element) { PsiClass klass = findSourceElement(element); if (klass == null) return Collections.emptySet(); GlobalSearchScope scope = getSearchScope(element, true); PsiShortNamesCache cache = PsiShortNamesCache.getInstance(element.getProject()); List<Pair<? extends PsiNamedElement, Integer>> classesWithWeights = new ArrayList<>(); for (Pair<String, Integer> eachNameWithWeight : TestFinderHelper.collectPossibleClassNamesWithWeights(klass.getName())) { for (PsiClass eachClass : cache.getClassesByName(eachNameWithWeight.first, scope)) { if (isTestSubjectClass(eachClass)) { classesWithWeights.add(Pair.create(eachClass, eachNameWithWeight.second)); } } } return TestFinderHelper.getSortedElements(classesWithWeights, false); }