@Override
  public @Nullable ModCommandAction asModCommandAction() {
    if (!(myFix instanceof ModCommandQuickFix mcFix)) return null;
    return new ModCommandAction() {
      @Override
      public @Nullable Presentation getPresentation(@NotNull ActionContext context) {
        if (InjectedLanguageManager.getInstance(context.project()).isInjectedFragment(context.file()) &&
            isShouldBeAppliedToInjectionHost() == ThreeState.YES) {
          return null;
        }
        PsiElement element = context.findLeaf();
        if (element == null || !myFix.isAvailable(context.project(), element)) return null;
        return Presentation.of(mcFix.getName());
      }

      @Override
      public @NotNull ModCommand perform(@NotNull ActionContext context) {
        PsiElement element = Objects.requireNonNull(context.findLeaf());
        InspectionManager inspectionManager = InspectionManager.getInstance(context.project());
        PsiElement container = getContainer(element);
        boolean caretWasBeforeStatement = container != null && context.offset() == container.getTextRange().getStartOffset();
        ProblemDescriptor descriptor = inspectionManager.createProblemDescriptor(
          element, element, "", ProblemHighlightType.GENERIC_ERROR_OR_WARNING, false);
        ModCommand command = mcFix.perform(context.project(), descriptor);
        if (caretWasBeforeStatement) {
          command = ModCommand.moveCaretAfter(command, container.getContainingFile(), context.offset(), true);
        }
        return command;
      }

      @Override
      public @NotNull String getFamilyName() {
        return mcFix.getFamilyName();
      }
    };
  }
@Override
  public @Nullable ModCommandAction asModCommandAction()