X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Fjws2%2FJws2Discoverer.java;h=1b2c708fd375c907dd89ca5fe00a8d752379c45c;hb=37de9310bec3501cbc6381e0c3dcb282fcaad812;hp=a111d6835f4d0f9dfa5cc112a186cd296dd25178;hpb=9d139ca8d1af8f0f2d78193d418ae9e9168a3e8a;p=jalview.git diff --git a/src/jalview/ws/jws2/Jws2Discoverer.java b/src/jalview/ws/jws2/Jws2Discoverer.java index a111d68..1b2c708 100644 --- a/src/jalview/ws/jws2/Jws2Discoverer.java +++ b/src/jalview/ws/jws2/Jws2Discoverer.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2) - * Copyright (C) 2014 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ 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 ignoredServices = new HashSet(); - for (String ignored : Cache.getDefault( - "IGNORED_JABAWS_SERVICETYPES", "") - .split("\\|")) + for (String ignored : Cache.getDefault("IGNORED_JABAWS_SERVICETYPES", + "").split("\\|")) { ignoredServices.add(ignored); } @@ -419,15 +419,16 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI Desktop.showUrl(service.getHost()); } }); - hitm.setToolTipText(JvSwingUtils - .wrapTooltip(false, MessageManager.getString("label.open_jabaws_web_page "))); + hitm.setToolTipText(JvSwingUtils.wrapTooltip(false, + MessageManager.getString("label.open_jabaws_web_page"))); 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 @@ -705,14 +707,13 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI } else { - Cache.log.info("Ignoring duplicate url " + url + " in " + Cache.log.warn("Ignoring duplicate url " + url + " in " + JWS2HOSTURLS + " list"); } } catch (MalformedURLException ex) { - Cache.log - .warn("Problem whilst trying to make a URL from '" - + ((url != null) ? url : "") + "'"); + Cache.log.warn("Problem whilst trying to make a URL from '" + + ((url != null) ? url : "") + "'"); 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)