@Override
  protected @Nullable Presentation getPresentation(@NotNull ActionContext context, @NotNull PsiElement element) {
    final NavigatablePsiElement maybeField =
      PsiTreeUtil.getParentOfType(element, PsiMethod.class, PsiFunctionalExpression.class, PsiField.class);
    if (!(maybeField instanceof PsiField field)) return null;
    if (field.hasModifierProperty(PsiModifier.STATIC)) return null;
    final PsiClass containingClass = field.getContainingClass();
    if (containingClass == null ||
        containingClass instanceof PsiAnonymousClass ||
        containingClass.isInterface()) {
      return null;
    }
    final List<PsiClassType> exceptions = ExceptionUtil.getUnhandledExceptions(field);
    if (exceptions.isEmpty()) {
      return null;
    }
    final PsiMethod[] existedConstructors = containingClass.getConstructors();
    return Presentation.of(QuickFixBundle.message("add.exception.from.field.initializer.to.constructor.throws.text", existedConstructors.length));
  }
@Override
  protected @Nullable Presentation getPresentation(@NotNull ActionContext context, @NotNull PsiElement element)