void (int offset, @NotNull String text) { ThreadingAssertions.assertEventDispatchThread(); List<Pair<String, ConsoleViewContentType>> result = myInputMessageFilter.applyFilter(text, ConsoleViewContentType.USER_INPUT); if (result == null) { doInsertUserInput(offset, text); } else { for (Pair<String, ConsoleViewContentType> pair : result) { String chunkText = pair.getFirst(); ConsoleViewContentType chunkType = pair.getSecond(); if (chunkType.equals(ConsoleViewContentType.USER_INPUT)) { doInsertUserInput(offset, chunkText); offset += chunkText.length(); } else { print(chunkText, chunkType, null); } } } }