@Override
  public void update(@NotNull AnActionEvent e) {
    e.getPresentation().setEnabled(myUndo ? myUndoManager.isUndoAvailable(myEditor) : myUndoManager.isRedoAvailable(myEditor));
  }
@Override
  public void update(@NotNull AnActionEvent e)