List<Location> (@NotNull Project project, @NotNull GlobalSearchScope scope, String paramName, String methodName, String className) { List<Location> results = Collections.emptyList(); PsiClass aClass = ClassUtil.findPsiClass(PsiManager.getInstance(project), className, null, true, scope); if (aClass != null) { results = new SmartList<>(); if (methodName.trim().equals(aClass.getName())) { results.add(createClassNavigatable(paramName, aClass)); } else { PsiMethod[] methods = aClass.findMethodsByName(methodName.trim(), true); for (PsiMethod method : methods) { results.add(paramName != null ? new PsiMemberParameterizedLocation(project, method, aClass, paramName) : MethodLocation.elementInClass(method, aClass)); } } } return results; }