if (!headless)
{
desktop = new Desktop();
+ desktop.setInBatchMode(true); // indicate we are starting up
desktop.setVisible(true);
desktop.startServiceDiscovery();
if (!aparser.contains("nousagestats"))
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())
+ 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)
return v_client;
}
+ /**
+ * flag set if jalview GUI is being operated programmatically
+ */
+ private boolean inBatchMode=false;
+
+ /**
+ * check if jalview GUI is being operated programmatically
+ * @return inBatchMode
+ */
+ public boolean isInBatchMode()
+ {
+ return inBatchMode;
+ }
+
+ /**
+ * set flag if jalview GUI is being operated programmatically
+ * @param inBatchMode
+ */
+ public void setInBatchMode(boolean inBatchMode)
+ {
+ this.inBatchMode = inBatchMode;
+ }
+
public void startServiceDiscovery()
{