if (lastBottomButton != null)
menuManager.setActionSelected(lastBottomButton,enable);
}
public void refreshUndoButtons() {
UndoController undoController = null;
if (activeTopView != null)
undoController = activeTopView.getUndoController();
if (undoController!=currentUndoController){
if (currentUndoController!=null)
currentUndoController.getEditSupport().removeUndoableEditListener(this);
if (undoController!=null)
undoController.getEditSupport().addUndoableEditListener(this);
currentUndoController=undoController;
}
boolean canUndo = false;
boolean canRedo = false;
// String undoText = "";
// String redoText = "";
if (undoController != null){
canUndo = undoController.canUndo();
canRedo = undoController.canRedo();
// undoText = undoController.getUndoManager().getUndoPresentationName();
// redoText = undoController.getUndoManager().getRedoPresentationName();
}
menuManager.setActionEnabled(ACTION_UNDO,canUndo);
menuManager.setActionEnabled(ACTION_REDO,canRedo);