JAL-4285 JAL-4262 Added a scrollable dialog to display errors. Moved old-style CLI...
[jalview.git] / src / jalview / bin / Commands.java
index e6c7b54..8312b29 100644 (file)
@@ -143,22 +143,9 @@ public class Commands
     }
 
     // report errors
-    StringBuilder sb = new StringBuilder();
-    for (String error : errors)
-    {
-      sb.append("- " + error);
-      sb.append("\n");
-    }
-    if (Platform.isHeadless())
-    {
-      Console.debug("All errors from command line argument commands:\n"
-              + sb.toString());
-    }
-    else
-    {
-      // scrollable dialog box
-
-    }
+    Console.debug("All errors from command line argument commands:\n"
+            + errorsToString());
+    // gui errors reported in Jalview
 
     if (argParser.getBoolean(Arg.QUIT))
     {
@@ -1176,4 +1163,20 @@ public class Commands
 
     return whatNext.OKAY;
   }
+
+  public List<String> getErrors()
+  {
+    return errors;
+  }
+
+  public String errorsToString()
+  {
+    StringBuilder sb = new StringBuilder();
+    for (String error : errors)
+    {
+      sb.append("- " + error);
+      sb.append("\n");
+    }
+    return sb.toString();
+  }
 }