void (@NotNull PsiImportStaticReferenceElement ref) { JavaResolveResult[] results = computeIfSmartMode(ref.getProject(), () -> ref.multiResolve(false)); if (results == null) { results = JavaResolveResult.EMPTY_ARRAY; } PsiElement referenceNameElement = ref.getReferenceNameElement(); if (!myHolder.hasErrorResults()) { PsiElement resolved = results.length >= 1 ? results[0].getElement() : null; if (results.length > 1) { for (int i = 1; i < results.length; i++) { PsiElement element = results[i].getElement(); if (resolved instanceof PsiMethod && !(element instanceof PsiMethod) || resolved instanceof PsiVariable && !(element instanceof PsiVariable) || resolved instanceof PsiClass && !(element instanceof PsiClass)) { resolved = null; break; } } } TextAttributesScheme colorsScheme = myHolder.getColorsScheme(); if (resolved instanceof PsiClass) { myHolder.add(HighlightNamesUtil.highlightClassName((PsiClass)resolved, ref, colorsScheme)); } else { if (referenceNameElement != null) { if (resolved instanceof PsiVariable) { myHolder.add(HighlightNamesUtil.highlightVariableName((PsiVariable)resolved, referenceNameElement, colorsScheme)); } else if (resolved instanceof PsiMethod) { myHolder.add(HighlightNamesUtil.highlightMethodName((PsiMethod)resolved, referenceNameElement, false, colorsScheme)); } } } } }