minor
authorpeter <peter@jetbrains.com>
Mon, 30 Jan 2012 14:51:18 +0000 (15:51 +0100)
committerpeter <peter@jetbrains.com>
Mon, 30 Jan 2012 16:07:30 +0000 (17:07 +0100)
jps/jps-builders/src/org/jetbrains/jps/incremental/groovy/GroovycOSProcessHandler.java

index 9afc7e4f2f3aa79f8c305480192b77372de90db1..02bd682eec39a27b19129ced41c532f6cf29c1f7 100644 (file)
@@ -181,6 +181,21 @@ public class GroovycOSProcessHandler extends BaseOSProcessHandler {
     return toRecompileFiles;
   }
 
+  public boolean shouldRetry() {
+    if (getProcess().exitValue() != 0) {
+      return true;
+    }
+    for (CompilerMessage message : compilerMessages) {
+      if (message.getKind() == BuildMessage.Kind.ERROR) {
+        return true;
+      }
+    }
+    if (getStdErr().length() > 0) {
+      return true;
+    }
+    return false;
+  }
+
   public List<CompilerMessage> getCompilerMessages() {
     ArrayList<CompilerMessage> messages = new ArrayList<CompilerMessage>(compilerMessages);
     final StringBuffer unparsedBuffer = getStdErr();