private static void registerIntention(@NotNull PsiExpressionList arguments,
                                        @NotNull HighlightInfo.Builder builder,
                                        TextRange fixRange,
                                        @NotNull JavaResolveResult candidate) {
    if (!candidate.isStaticsScopeCorrect()) return;
    PsiMethod method = (PsiMethod)candidate.getElement();
    PsiSubstitutor substitutor = candidate.getSubstitutor();
    if (method == null || !BaseIntentionAction.canModify(arguments)) return;
    if (method.isConstructor() && arguments.getParent() instanceof PsiMethodCallExpression &&
        ((PsiMethodCallExpression)arguments.getParent()).getMethodExpression().textMatches("this") &&
        PsiTreeUtil.isAncestor(method, arguments, true)) {
      // Avoid creating recursive constructor call
      return;
    }
    var action = new RemoveRedundantArgumentsFix(method, arguments, substitutor);
    builder.registerFix(action, null, null, fixRange, null);
  }
private static void registerIntention(@NotNull PsiExpressionList arguments,
                                        @NotNull HighlightInfo.Builder builder,
                                        TextRange fixRange,
                                        @NotNull JavaResolveResult candidate)