void (@NotNull PsiIdentifier identifier) { TextAttributesScheme colorsScheme = myHolder.getColorsScheme(); PsiElement parent = identifier.getParent(); if (parent instanceof PsiVariable variable) { if (variable.getInitializer() == null) { PsiElement child = variable.getLastChild(); if (child instanceof PsiErrorElement && child.getPrevSibling() == identifier) return; } myHolder.add(HighlightNamesUtil.highlightVariableName(variable, identifier, colorsScheme)); } else if (parent instanceof PsiClass aClass) { if (!(parent instanceof PsiAnonymousClass) && aClass.getNameIdentifier() == identifier) { myHolder.add(HighlightNamesUtil.highlightClassName(aClass, identifier, colorsScheme)); } } else if (parent instanceof PsiMethod method) { myHolder.add(HighlightNamesUtil.highlightMethodName(method, identifier, true, colorsScheme)); } super.visitIdentifier(identifier); }