List<CompilerMessage> () { ArrayList<CompilerMessage> messages = new ArrayList<>(compilerMessages); final StringBuffer unparsedBuffer = getStdErr(); if (unparsedBuffer.length() != 0) { String msg = unparsedBuffer.toString(); if (msg.contains(GroovyRtConstants.NO_GROOVY)) { messages.add(reportNoGroovy(msg)); } else { messages.add(new CompilerMessage( GroovyJpsBundle.message("compiler.name.groovyc"), BuildMessage.Kind.INFO, GroovyJpsBundle.message("while.compiling.chunk.0.message.1", myChunk.getPresentableShortName(), msg) )); } } if (myExitCode != 0) { for (CompilerMessage message : messages) { if (message.getKind() == BuildMessage.Kind.ERROR) { return messages; } } messages.add(new CompilerMessage( GroovyJpsBundle.message("compiler.name.groovyc"), BuildMessage.Kind.ERROR, GroovyJpsBundle.message("internal.groovyc.error.code.0", myExitCode) )); } return messages; }