private static @NotNull TailType getMethodArgumentTailType(final @NotNull PsiExpression argument,
                                                               final int index,
                                                               final @NotNull PsiMethod method,
                                                               final @NotNull PsiSubstitutor substitutor,
                                                               final PsiParameter @NotNull [] params) {
      if (index >= params.length || index == params.length - 2 && params[index + 1].isVarArgs()) {
        return TailTypes.noneType();
      }
      if (index == params.length - 1) {
        final PsiElement call = argument.getParent().getParent();
        // ignore JspMethodCall
        if (call instanceof SyntheticElement) return TailTypes.noneType();

        PsiType returnType = method.getReturnType();
        if (returnType != null) returnType = substitutor.substitute(returnType);
        return getFinalCallParameterTailType(call, returnType, method);
      }
      if (CodeInsightSettings.getInstance().SHOW_PARAMETER_NAME_HINTS_ON_COMPLETION) {
        PsiCall completedOuterCall = getCompletedOuterCall(argument);
        if (completedOuterCall != null) return new CommaTailTypeWithSyncHintUpdate(completedOuterCall);
      }
      return CommaTailType.INSTANCE;
    }
private static @NotNull TailType getMethodArgumentTailType(final @NotNull PsiExpression argument,
                                                               final int index,
                                                               final @NotNull PsiMethod method,
                                                               final @NotNull PsiSubstitutor substitutor,
                                                               final PsiParameter @NotNull [] params)