use of com.helospark.tactview.ui.javafx.commands.UiCommand in project tactview by helospark.
the class UiCommandInterpreterService method synchronousSend.
public <T extends UiCommand> T synchronousSend(T uiCommand) {
logger.info("Executing {}", uiCommand);
dirtyRepository.setDirty(true);
redoHistory.clear();
uiCommand.execute();
if (uiCommand.isRevertable()) {
commandHistory.push(uiCommand);
while (commandHistory.size() > historySize) {
UiCommand command = commandHistory.pollLast();
if (command != null) {
command.preDestroy();
}
}
}
return uiCommand;
}
Aggregations