@Nullable
  private static Pair<PsiFile, Editor> getFileAndEditor(@NotNull AnActionEvent e) {
    final Editor editor = MarkdownActionUtil.findMarkdownEditor(e);
    final PsiFile psiFile = e.getData(CommonDataKeys.PSI_FILE);
    if (editor == null || psiFile == null || !psiFile.isValid()) {
      return null;
    }

    return Pair.create(psiFile, editor);
  }
@Nullable
  private static Pair<PsiFile, Editor> getFileAndEditor(@NotNull AnActionEvent e)