From 6b42903480336217a0b8ce9fc1604e686ba3b525 Mon Sep 17 00:00:00 2001 From: jprocter Date: Wed, 22 Sep 2010 00:57:59 +0000 Subject: [PATCH] ensure presets and parameters are discovered when service is discovered --- src/jalview/ws/jws2/Jws2Discoverer.java | 7 +++++-- src/jalview/ws/jws2/MsaWSClient.java | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/jalview/ws/jws2/Jws2Discoverer.java b/src/jalview/ws/jws2/Jws2Discoverer.java index d9b72ff..fdbb740 100644 --- a/src/jalview/ws/jws2/Jws2Discoverer.java +++ b/src/jalview/ws/jws2/Jws2Discoverer.java @@ -164,8 +164,10 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI + srv.toString()); Jws2Instance service = new Jws2Instance(jwsservers, srv.toString(), service2); - services.add(service); - service.getParamStore(); + services.add(service); + // retrieve the presets and parameter set and cache now + service.getParamStore().getPresets(); + service.hasParameters(); } public class Jws2Instance @@ -283,6 +285,7 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI return hosturl+(hosturl.lastIndexOf("/")==(hosturl.length()-1) ? "/" : "") +serviceType; } private boolean hasParams=false,lookedForParams=false; + public boolean hasParameters() { if (!lookedForParams) diff --git a/src/jalview/ws/jws2/MsaWSClient.java b/src/jalview/ws/jws2/MsaWSClient.java index 2453ac0..1230abb 100644 --- a/src/jalview/ws/jws2/MsaWSClient.java +++ b/src/jalview/ws/jws2/MsaWSClient.java @@ -274,15 +274,18 @@ public class MsaWSClient extends Jws2Client boolean hasparams = service.hasParameters(); do { + String action="Align "; if (submitGaps == true) { - msawsmenu = new JMenu("profile " + svcname); + action="Realign "; + msawsmenu = new JMenu("Realign with " + svcname); + msawsmenu.setToolTipText("Align sequences to an existing alignment"); rmsawsmenu.add(msawsmenu); } final boolean withGaps = submitGaps; JMenuItem method = new JMenuItem(calcName + "Defaults"); - method.setToolTipText("Align with default settings"); + method.setToolTipText(action+"with default settings"); method.addActionListener(new ActionListener() { -- 1.7.10.2