@Override
  protected @Nullable Presentation getPresentation(@NotNull ActionContext context, @NotNull PsiElement element) {
    if (super.getPresentation(context, element) == null) {
      return null;
    }
    if (element instanceof PsiCompiledElement || !BaseIntentionAction.canModify(element) || !element.getLanguage().is(JavaLanguage.INSTANCE)) {
      return null;
    }

    PsiParameter parameter = PsiTreeUtil.getParentOfType(element, PsiParameter.class, false, PsiClass.class, PsiCodeBlock.class);
    boolean available;
    if (parameter != null) {
      available = isAvailableOnVariable(parameter);
    } else {
      PsiDeclarationStatement decl =
        PsiTreeUtil.getParentOfType(element, PsiDeclarationStatement.class, false, PsiClass.class, PsiCodeBlock.class);
      available = decl != null && isAvailableOnDeclarationStatement(decl);
    }
    if (!available) return null;
    return Presentation.of(getFamilyName());
  }
@Override
  protected @Nullable Presentation getPresentation(@NotNull ActionContext context, @NotNull PsiElement element)