@Override
  public void update(@NotNull AnActionEvent e) {
    Editor editor = e.getData(CommonDataKeys.EDITOR);
    if (editor == null || editor.getEditorKind() != EditorKind.PREVIEW) {
      e.getPresentation().setEnabledAndVisible(false);
      return;
    }
    super.update(e);
  }
@Override
  public void update(@NotNull AnActionEvent e)