can use whitespace, comma or semicolon to separate IDs
authorjprocter <Jim Procter>
Wed, 24 Jun 2009 08:24:33 +0000 (08:24 +0000)
committerjprocter <Jim Procter>
Wed, 24 Jun 2009 08:24:33 +0000 (08:24 +0000)
src/jalview/gui/SequenceFetcher.java

index 2201167..34e8143 100755 (executable)
@@ -372,9 +372,11 @@ public class SequenceFetcher extends JPanel implements Runnable
     {
       error += "Please select the source database\n";
     }
-    com.stevesoft.pat.Regex empty = new com.stevesoft.pat.Regex("\\s+", "");
+    // TODO: make this transformation optional and configurable
+    com.stevesoft.pat.Regex empty = new com.stevesoft.pat.Regex("(\\s|[,; ])+",";"); //\\s+", "");
     textArea.setText(empty.replaceAll(textArea.getText()));
-    if (textArea.getText().length() == 0)
+    // see if there's anthing to search with
+    if (!new com.stevesoft.pat.Regex("[A-Za-z0-9_.]").search(textArea.getText()))
     {
       error += "Please enter a (semi-colon separated list of) database id(s)";
     }