@Override public void processTerminated(ProcessEvent event) { if (firstUnprocessedIndex < output.length()) { handleSkippedOutput(output.substring(firstUnprocessedIndex).trim()); } int exitCode = event.getExitCode(); // 0 is normal, 1 is "errors found" — handled by the messages above if (exitCode != 0 && exitCode != 1) { compileContext.addMessage( ERROR, "Compiler terminated with exit code: " + exitCode, "", -1, -1); } }