boolean (PsiClass psiClass, String name, SearchScope useScope) { if (!(useScope instanceof LocalSearchScope)) { PsiSearchHelper searchHelper = PsiSearchHelper.getInstance(psiClass.getProject()); if (PsiSearchHelper.SearchCostResult.ZERO_OCCURRENCES == searchHelper.isCheapEnoughToSearch(JUnitCommonClassNames.ORG_JUNIT_JUPITER_PARAMS_ENUM_SOURCE_SHORT, (GlobalSearchScope)useScope, null, null)) { return false; } PsiSearchHelper.SearchCostResult cheapEnough = searchHelper.isCheapEnoughToSearch(name, (GlobalSearchScope)useScope, null, null); if (cheapEnough == PsiSearchHelper.SearchCostResult.ZERO_OCCURRENCES || cheapEnough == PsiSearchHelper.SearchCostResult.TOO_MANY_OCCURRENCES) { return false; } } return true; }