@Override
  public @NotNull LocalQuickFix convertToFix(@NotNull IntentionAction action) {
    if (action instanceof LocalQuickFix) {
      return (LocalQuickFix)action;
    }
    return new LocalQuickFix() {
      @Override
      public @NotNull String getName() {
        return action.getText();
      }

      @Override
      public @NotNull String getFamilyName() {
        return action.getFamilyName();
      }

      @Override
      public boolean startInWriteAction() {
        return action.startInWriteAction();
      }

      @Override
      public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {
        final PsiFile psiFile = descriptor.getPsiElement().getContainingFile();
        Editor selectedTextEditor = FileEditorManager.getInstance(project).getSelectedTextEditor();
        final Editor editor = selectedTextEditor != null ? selectedTextEditor : new LazyEditor(psiFile);
        try {
          action.invoke(project, editor, psiFile);
        }
        catch (IncorrectOperationException e) {
          LOG.error(e);
        }
      }
    };
  }
@Override
  public @NotNull LocalQuickFix convertToFix(@NotNull IntentionAction action)