X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Fjws2%2FJws2Discoverer.java;h=60fa85b3fc7817595bb2db9487ac0eb27cd83a7b;hb=17e77c3f2949a0729322b4a8d907f3f34b6a9914;hp=f2b1145788950c776d8e5d166574f4ae1ebac918;hpb=fe5077a3314116b0c478a8b9237c81f986fa5a50;p=jalview.git diff --git a/src/jalview/ws/jws2/Jws2Discoverer.java b/src/jalview/ws/jws2/Jws2Discoverer.java index f2b1145..60fa85b 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-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 ignoredServices = new HashSet(); - 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 : "") + "'"); + 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)