JAL-1645 Version-Rel Version 2.9 Year-Rel 2015 Licensing glob
[jalview.git] / src / jalview / ws / jws2 / Jws2Discoverer.java
index f2b1145..60fa85b 100644 (file)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9)
+ * Copyright (C) 2015 The Jalview Authors
  * 
  * This file is part of Jalview.
  * 
@@ -145,6 +145,7 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
     this.aborted = aborted;
 
   }
+
   public void run()
   {
 
@@ -172,9 +173,8 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
 
     // first set up exclusion list if needed
     final Set<String> ignoredServices = new HashSet<String>();
-    for (String ignored : Cache.getDefault(
-            "IGNORED_JABAWS_SERVICETYPES", "")
-            .split("\\|"))
+    for (String ignored : Cache.getDefault("IGNORED_JABAWS_SERVICETYPES",
+            "").split("\\|"))
     {
       ignoredServices.add(ignored);
     }
@@ -425,9 +425,10 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
       service.attachWSMenuEntry(atpoint, alignFrame);
       if (alternates.containsKey(service.serviceType))
       {
-        atpoint.add(hitm = new JMenu(MessageManager.getString("label.switch_server")));
-        hitm.setToolTipText(JvSwingUtils
-                .wrapTooltip(false, MessageManager.getString("label.choose_jabaws_server")));
+        atpoint.add(hitm = new JMenu(MessageManager
+                .getString("label.switch_server")));
+        hitm.setToolTipText(JvSwingUtils.wrapTooltip(false,
+                MessageManager.getString("label.choose_jabaws_server")));
         for (final Jws2Instance sv : alternates.get(service.serviceType))
         {
           JMenuItem itm;
@@ -516,7 +517,8 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
           atpoint = JvSwingUtils.findOrCreateMenu(atpoint, host);
           if (atpoint.getToolTipText() == null)
           {
-            atpoint.setToolTipText(MessageManager.formatMessage("label.services_at", new String[]{host}));
+            atpoint.setToolTipText(MessageManager.formatMessage(
+                    "label.services_at", new String[] { host }));
           }
         }
         if (bytype)
@@ -560,8 +562,8 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
                 Desktop.showUrl(service.getHost());
               }
             });
-            hitm.setToolTipText(JvSwingUtils
-                    .wrapTooltip(true, MessageManager.getString("label.open_jabaws_web_page")));
+            hitm.setToolTipText(JvSwingUtils.wrapTooltip(true,
+                    MessageManager.getString("label.open_jabaws_web_page")));
             lasthostFor.put(service.action, host);
           }
           hostLabels.add(host + service.serviceType
@@ -710,9 +712,8 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
           }
         } catch (MalformedURLException ex)
         {
-          Cache.log
-                  .warn("Problem whilst trying to make a URL from '"
-                          + ((url != null) ? url : "<null>") + "'");
+          Cache.log.warn("Problem whilst trying to make a URL from '"
+                  + ((url != null) ? url : "<null>") + "'");
           Cache.log
                   .warn("This was probably due to a malformed comma separated list"
                           + " in the "
@@ -723,9 +724,8 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
       }
     } catch (Exception ex)
     {
-      Cache.log.warn(
-              "Error parsing comma separated list of urls in "
-                      + JWS2HOSTURLS + " preference.", ex);
+      Cache.log.warn("Error parsing comma separated list of urls in "
+              + JWS2HOSTURLS + " preference.", ex);
     }
     return urls;
   }
@@ -746,8 +746,8 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
   {
     try
     {
-      compbio.ws.client.WSTester.main(new String[]
-      { "-h=" + foo.toString() });
+      compbio.ws.client.WSTester
+              .main(new String[] { "-h=" + foo.toString() });
     } catch (Exception e)
     {
       e.printStackTrace();
@@ -853,7 +853,8 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
       if (getInvalidServiceUrls() != null
               && getInvalidServiceUrls().size() > 0)
       {
-        ermsg.append("URLs that could not be contacted: \n");
+        ermsg.append(MessageManager.getString("warn.urls_not_contacted")
+                + ": \n");
         for (String svcurl : getInvalidServiceUrls())
         {
           if (list)
@@ -869,7 +870,7 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
       if (getUrlsWithoutServices() != null
               && getUrlsWithoutServices().size() > 0)
       {
-        ermsg.append("URLs without any JABA Services : \n");
+        ermsg.append(MessageManager.getString("warn.urls_no_jaba") + ": \n");
         for (String svcurl : getUrlsWithoutServices())
         {
           if (list)