@Override
    public void outputLineAvailable(@NlsSafe String line) {
      if (!StringUtil.isEmpty(line)) {
        if (line.startsWith(ExternalJavacManager.STDOUT_LINE_PREFIX)) {
          //noinspection UseOfSystemOutOrSystemErr
          System.out.println(line);
          if (LOG.isDebugEnabled()) {
            LOG.debug(line);
          }
        }
        else if (line.startsWith(ExternalJavacManager.STDERR_LINE_PREFIX)) {
          //noinspection UseOfSystemOutOrSystemErr
          System.err.println(line);
          if (LOG.isDebugEnabled()) {
            LOG.debug(line);
          }
        }
        else if (line.contains("java.lang.OutOfMemoryError")) {
          myContext.processMessage(new CompilerMessage(getBuilderName(), BuildMessage.Kind.ERROR, JpsBuildBundle.message("build.message.insufficient.memory")));
          myErrorCount.incrementAndGet();
        }
        else {
          myContext.processMessage(new CompilerMessage(getBuilderName(), BuildMessage.Kind.INFO, line));
        }
      }
    }
@Override
    public void outputLineAvailable(@NlsSafe String line)