@Override
  public void visit(@NotNull PsiElement element) {
    if (element instanceof PsiReferenceExpression
        || element instanceof PsiLocalVariable
        || element instanceof PsiParameter
        || element instanceof PsiDocParamRef) {
      PsiElement context = PsiTreeUtil.findFirstParent(element, p -> p instanceof PsiMethod || p instanceof PsiClassInitializer || p instanceof PsiLambdaExpression);
      if (context != null) {
        PsiElement rainbowElement = element instanceof PsiReferenceExpression || element instanceof PsiDocParamRef
                            ? element : ((PsiVariable)element).getNameIdentifier();
        PsiElement resolved = element instanceof PsiReferenceExpression
                             ? ((PsiReferenceExpression)element).resolve()
                             : element instanceof PsiDocParamRef
                               ? element.getReference() == null ? null : element.getReference().resolve()
                               : element;
        HighlightInfo attrs = getRainbowSymbolKey(context, rainbowElement, resolved);
        addInfo(attrs);
      }
    }
  }
@Override
  public void visit(@NotNull PsiElement element)