@Override
  protected @Nullable Presentation getPresentation(@NotNull ActionContext context, @NotNull PsiNewExpression newExpression) {
    if (!myPsiClass.isValid() || !myTargetMethod.isValid()) return null;
    final PsiTypeParameter[] typeParameters = myPsiClass.getTypeParameters();
    if (typeParameters.length == 0 || newExpression.getArgumentList() == null) return null;
    final PsiJavaCodeReferenceElement reference = newExpression.getClassOrAnonymousClassReference();
    if (reference == null) return null;
    final PsiReferenceParameterList parameterList = reference.getParameterList();
    if (parameterList == null) return null;
    final PsiSubstitutor substitutor = inferTypeArguments(newExpression);
    final PsiParameter[] parameters = myTargetMethod.getParameterList().getParameters();
    if (parameters.length != myExpressions.length) return null;
    for (int i = 0, length = parameters.length; i < length; i++) {
      PsiParameter parameter = parameters[i];
      final PsiType expectedType = substitutor.substitute(parameter.getType());
      if (!myExpressions[i].isValid()) return null;
      final PsiType actualType = myExpressions[i].getType();
      if (expectedType == null || actualType == null || !TypeConversionUtil.isAssignable(expectedType, actualType)) return null;
    }
    for (PsiTypeParameter parameter : typeParameters) {
      if (substitutor.substitute(parameter) == null) return null;
    }
    String typeParametersText = StringUtil.join(myPsiClass.getTypeParameters(), typeParameter -> {
      final PsiType substituted = substitutor.substitute(typeParameter);
      return substituted != null ? substituted.getPresentableText() : CommonClassNames.JAVA_LANG_OBJECT;
    }, ", ");
    return Presentation.of(JavaAnalysisBundle.message("change.type.arguments.to.0", typeParametersText))
      .withPriority(PriorityAction.Priority.HIGH)
      .withFixAllOption(this);
  }
@Override
  protected @Nullable Presentation getPresentation(@NotNull ActionContext context, @NotNull PsiNewExpression newExpression)