void (@NotNull ProcessEvent event, @NotNull Key outputType) { final String text = event.getText(); if (!StringUtil.isEmptyOrSpaces(text)) { if (LOG.isTraceEnabled()) { LOG.trace("text from javac: " + text); } String prefix = null; if (outputType == ProcessOutputTypes.STDOUT) { prefix = STDOUT_LINE_PREFIX; } else if (outputType == ProcessOutputTypes.STDERR) { prefix = STDERR_LINE_PREFIX; } if (prefix != null) { List<DiagnosticOutputConsumer> consumers = null; final UUID processId = ((ExternalJavacProcessHandler)event.getProcessHandler()).getProcessId(); synchronized (mySessions) { for (CompileSession session : mySessions.values()) { if (processId.equals(session.getProcessId())) { if (consumers == null) { consumers = new ArrayList<>(); } consumers.add(session.myHandler.getDiagnosticSink()); } } } final String msg = prefix + ": " + text; if (consumers != null) { for (DiagnosticOutputConsumer consumer : consumers) { consumer.outputLineAvailable(msg); } } else { LOG.info(msg.trim()); } } } }