void (@NotNull String text) { myTextBuilder.append(text); if (text.contains("\n")) { String[] lines = myTextBuilder.toString().split("\n"); myTextBuilder = new StringBuilder(); if (!text.endsWith("\n")) { myTextBuilder.append(lines[lines.length - 1]); lines = Arrays.copyOf(lines, lines.length - 1); } for (String line : lines) { myDebugger.processResponse(line + "\n"); } } }