// handle notifications
private void handleUndoUpdate() {
ActionManager actionManager = Application.getInstance().getContext().getActionManager();
UndoManager undoManager = Application.getInstance().getContext().getUndoManager();
actionManager.enable("undo", undoManager.canUndo());
actionManager.enable("redo", undoManager.canRedo());
}