Merge branch 'Release_2_8_1_Branch' into Release_2_8_1_Branch_i18n
[jalview.git] / src / jalview / gui / Desktop.java
index 6dede64..f4d1885 100644 (file)
@@ -648,8 +648,8 @@ public class Desktop extends jalview.jbgui.GDesktop implements
     // A HEADLESS STATE WHEN NO DESKTOP EXISTS. MUST RETURN
     // IF JALVIEW IS RUNNING HEADLESS
     // ///////////////////////////////////////////////
-    if (System.getProperty("java.awt.headless") != null
-            && System.getProperty("java.awt.headless").equals("true"))
+    if (instance == null || (System.getProperty("java.awt.headless") != null
+            && System.getProperty("java.awt.headless").equals("true")))
     {
       return;
     }
@@ -969,7 +969,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements
     }
 
     int reply = JOptionPane.showInternalConfirmDialog(desktop, panel,
-            "Input Alignment From URL", JOptionPane.OK_CANCEL_OPTION);
+            MessageManager.getString("label.input_alignment_from_url"), JOptionPane.OK_CANCEL_OPTION);
 
     if (reply != JOptionPane.OK_OPTION)
     {
@@ -1722,8 +1722,8 @@ public class Desktop extends jalview.jbgui.GDesktop implements
         if (!vamsasImport(chooser.getSelectedFile()))
         {
           JOptionPane.showInternalMessageDialog(Desktop.desktop,
-                  "Couldn't import '" + fle + "' as a new vamsas session.",
-                  "Vamsas Document Import Failed",
+                  MessageManager.formatMessage("label.couldnt_import_as_vamsas_session", new String[]{fle}),
+                  MessageManager.getString("label.vamsas_document_import_failed"),
                   JOptionPane.ERROR_MESSAGE);
         }
       }
@@ -2137,9 +2137,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements
         if (fm != null)
         {
           g.drawString(
-                  "Total Free Memory: " + df.format(totalFreeMemory)
-                          + "MB; Max Memory: " + df.format(maxMemory)
-                          + "MB; " + df.format(percentUsage) + "%", 10,
+                         MessageManager.formatMessage("label.memory_stats", new String[]{df.format(totalFreeMemory),df.format(maxMemory),df.format(percentUsage)}), 10,
                   getHeight() - fm.getHeight());
         }
       }
@@ -2437,7 +2435,9 @@ public class Desktop extends jalview.jbgui.GDesktop implements
   {
     boolean alive = true;
     Thread t0 = null, t1 = null, t2 = null;
-
+    // JAL-940 - JALVIEW 1 services are now being EOLed as of JABA 2.1 release
+    if (true)
+    {
     // todo: changesupport handlers need to be transferred
     if (discoverer == null)
     {
@@ -2447,28 +2447,31 @@ public class Desktop extends jalview.jbgui.GDesktop implements
     }
     // JAL-940 - disabled JWS1 service configuration - always start discoverer
     // until we phase out completely
-    if (true)
-    {
       (t0 = new Thread(discoverer)).start();
     }
 
-    try
+    // ENFIN services are EOLed as of Jalview 2.8.1 release
+    if (false)
     {
-      if (Cache.getDefault("SHOW_ENFIN_SERVICES", true))
+      try
       {
-        // EnfinEnvision web service menu entries are rebuild every time the
-        // menu is shown, so no changeSupport events are needed.
-        jalview.ws.EnfinEnvision2OneWay.getInstance();
-        (t1 = new Thread(jalview.ws.EnfinEnvision2OneWay.getInstance()))
-                .start();
+        if (Cache.getDefault("SHOW_ENFIN_SERVICES", true))
+        {
+          // EnfinEnvision web service menu entries are rebuild every time the
+          // menu is shown, so no changeSupport events are needed.
+          jalview.ws.EnfinEnvision2OneWay.getInstance();
+          (t1 = new Thread(jalview.ws.EnfinEnvision2OneWay.getInstance()))
+                  .start();
+        }
+      } catch (Exception e)
+      {
+        Cache.log
+                .info("Exception when trying to launch Envision2 workflow discovery.",
+                        e);
+        Cache.log.info(e.getStackTrace());
       }
-    } catch (Exception e)
-    {
-      Cache.log
-              .info("Exception when trying to launch Envision2 workflow discovery.",
-                      e);
-      Cache.log.info(e.getStackTrace());
     }
+
     if (Cache.getDefault("SHOW_JWS2_SERVICES", true))
     {
       if (jalview.ws.jws2.Jws2Discoverer.getDiscoverer().isRunning())