report any problematic web service URLs ( JAL-343 )
[jalview.git] / src / jalview / bin / Jalview.java
index 64ffd38..39daac6 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
  * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
  * 
  * This file is part of Jalview.
@@ -81,8 +81,9 @@ public class Jalview
             + System.getProperty("os.version"));
     if (new Platform().isAMac())
     {
-       System.setProperty("com.apple.mrj.application.apple.menu.about.name", "Jalview");
-       System.setProperty("apple.laf.useScreenMenuBar", "true");
+      System.setProperty("com.apple.mrj.application.apple.menu.about.name",
+              "Jalview");
+      System.setProperty("apple.laf.useScreenMenuBar", "true");
     }
 
     ArgsParser aparser = new ArgsParser(args);
@@ -94,6 +95,7 @@ public class Jalview
               .println("Usage: jalview -open [FILE] [OUTPUT_FORMAT] [OUTPUT_FILE]\n\n"
                       + "-nodisplay\tRun Jalview without User Interface.\n"
                       + "-props FILE\tUse the given Jalview properties file instead of users default.\n"
+                      + "-colour COLOURSCHEME\tThe colourscheme to be applied to the alignment\n"
                       + "-annotations FILE\tAdd precalculated annotations to the alignment.\n"
                       + "-tree FILE\tLoad the given newick format tree file onto the alignment\n"
                       + "-features FILE\tUse the given file to mark features on the alignment.\n"
@@ -178,6 +180,7 @@ public class Jalview
     if (!headless)
     {
       desktop = new Desktop();
+      desktop.setInBatchMode(true); // indicate we are starting up
       desktop.setVisible(true);
       desktop.startServiceDiscovery();
       if (!aparser.contains("nousagestats"))
@@ -410,7 +413,7 @@ public class Jalview
           ex.printStackTrace(System.err);
         }
       }
-      // todo - load PDB structure to alignment
+      // TODO - load PDB structure(s) to alignment JAL-629
       // (associate with identical sequence in alignment, or a specified
       // sequence)
 
@@ -535,7 +538,7 @@ public class Jalview
         startFeatureFetching(getFeatures);
       }
     }
-    // execute a groovy script.
+    // Once all other stuff is done, execute any groovy scripts (in order)
     if (groovyscript != null)
     {
       if (jalview.bin.Cache.groovyJarsPresent())
@@ -550,8 +553,11 @@ public class Jalview
                         + groovyscript);
       }
     }
-
-    // Once all other stuff is done, execute any groovy scripts (in order)
+    // and finally, turn off batch mode indicator - if the desktop still exists
+    if (desktop != null)
+    {
+      desktop.setInBatchMode(false);
+    }
   }
 
   private static void startUsageStats(final Desktop desktop)