@Nullable
  private static @NlsContexts.DialogMessage String getCannotInlineMessage(final PsiParameter psiParameter, final PsiMethod method) {
    if (psiParameter.isVarArgs()) {
      return JavaRefactoringBundle.message("inline.parameter.error.varargs");
    }
    if (method.findSuperMethods().length > 0 ||
        OverridingMethodsSearch.search(method).toArray(PsiMethod.EMPTY_ARRAY).length > 0) {
      return JavaRefactoringBundle.message("inline.parameter.error.hierarchy");
    }

    if (!method.getManager().isInProject(method)) {
      return JavaRefactoringBundle.message("inline.parameter.error.non.project.method");
    }
    return null;
  }
@Nullable
  private static @NlsContexts.DialogMessage String getCannotInlineMessage(final PsiParameter psiParameter, final PsiMethod method)