public void menuItemState(XJMenuItem item) {
   switch (item.getTag()) {
     case XJMainMenuBar.MI_NEW:
       item.setTitle(
           XJLocalizable.getXJString("New")
               + ((XJApplication.shared().getDocumentExtensions().size() > 1) ? "..." : ""));
       break;
     case XJMainMenuBar.MI_UNDO:
     case XJMainMenuBar.MI_REDO:
       getMainMenuBar().menuUndoRedoItemState(undoEngine.getCurrentUndo());
       break;
   }
 }
 public XJUndo getCurrentUndo() {
   return undoEngine.getCurrentUndo();
 }