@Override
      public boolean processTextOccurrence(@NotNull PsiElement element, int offsetInElement, @NotNull Processor<? super PsiReference> consumer) {
        if (!(element instanceof GrReferenceExpression ref)) {
          return true;
        }

        if (!name.equals(ref.getReferenceName()) || PsiUtil.isLValue(ref)) {
          return true;
        }

        PsiElement parent = ref.getParent();
        if (parent instanceof GrCommandArgumentList) {
          parent = parent.getParent();
        }
        if (paramCount >= 0 && !ref.hasMemberPointer() &&
            (!(parent instanceof GrMethodCall) || !argumentsMatch((GrMethodCall)parent, paramCount))) {
          return true;
        }

        GrExpression qualifier = ref.getQualifierExpression();
        if (qualifier == null || qualifier.getType() != null) {
          return true;
        }

        if (ref.resolve() != null) {
          return true;
        }

        if (ResolveUtil.isKeyOfMap(ref)) {
          return true;
        }

        return consumer.process((PsiReference)element);
      }
@Override
      public boolean processTextOccurrence(@NotNull PsiElement element, int offsetInElement, @NotNull Processor<? super PsiReference> consumer)