private @Nullable UndoRedo createUndoOrRedo(FileEditor editor, boolean isUndo) {
    if (!myManager.isUndoOrRedoAvailable(editor, isUndo)) return null;
    return isUndo ? new Undo(myState, editor) : new Redo(myState, editor);
  }
private @Nullable UndoRedo createUndoOrRedo(FileEditor editor, boolean isUndo)