PsiElement (String name, boolean resolveImportElement) { final List<RatedResolveResult> results = getElementsNamed(name, resolveImportElement); return results.isEmpty() ? null : RatedResolveResult.sorted(results).get(0).getElement(); }