void (@NotNull ProcessEvent event, @NotNull Key outputType) { if (outputType instanceof ProcessOutputType) { myStreamsSynchronizer.doWhenStreamsSynchronized(event.getText(), (ProcessOutputType)outputType, () -> print(event.getText(), outputType)); } else { print(event.getText(), outputType); } }