ensure presets and parameters are discovered when service is discovered
authorjprocter <Jim Procter>
Wed, 22 Sep 2010 00:57:59 +0000 (00:57 +0000)
committerjprocter <Jim Procter>
Wed, 22 Sep 2010 00:57:59 +0000 (00:57 +0000)
src/jalview/ws/jws2/Jws2Discoverer.java
src/jalview/ws/jws2/MsaWSClient.java

index d9b72ff..fdbb740 100644 (file)
@@ -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)
index 2453ac0..1230abb 100644 (file)
@@ -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()
       {