code: void setUndoRedoState(UndoRedoState state) {
  
          if (state.hasUndo()) {
              m_undoButton.enable();
          } else {
              m_undoButton.disable(Messages.get().key(Messages.GUI_TOOLBAR_UNDO_DISABLED_0));
          }
          if (state.hasRedo()) {
              m_redoButton.enable();
          } else {
              m_redoButton.disable(Messages.get().key(Messages.GUI_TOOLBAR_REDO_DISABLED_0));
          }
      }
docs: Enables and disabler the undo redo buttons according to the state.<p>
  
  @param state the undo redo state