void (LogCommand command) { if (command.getPriority() > myPriorityThreshold) { return; } // proceed messages in a special way if (command instanceof AddMessageCommand addMessageCommand) { myDelayedMessages.add(addMessageCommand.getMessage()); } else { flushDelayedMessages(); // message type changed -> flush final AntOutputView firstView = myCurrentView; final AntOutputView secondView = firstView == myTreeView? myPlainTextView : myTreeView; command.execute(firstView); command.execute(secondView); } }