public void doAction(ActionEvent e) throws IllegalUserActionException {
GuiPackage guiPackage = GuiPackage.getInstance();
final String command = e.getActionCommand();
if (command.equals(ActionNames.UNDO)) {
guiPackage.goInHistory(-1);
} else if (command.equals(ActionNames.REDO)) {
guiPackage.goInHistory(1);
} else {
throw new IllegalArgumentException("Wrong action called: " + command);
}