ensure presets and parameters are discovered when service is discovered
[jalview.git] / src / jalview / ws / jws2 / Jws2Discoverer.java
index 1f3eee9..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)
@@ -405,6 +408,7 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
         }
       }
       if (!byhost && !hostLabels.contains(host + service.serviceType+service.getActionText()))
+              //!hostLabels.contains(host + (bytype ? service.serviceType+service.getActionText() : "")))
       {
         // add a marker indicating where this service is hosted
         // relies on services from the same host being listed in a contiguous
@@ -415,8 +419,10 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
         {
           atpoint.add(hitm = new JMenuItem(host));
           hitm.setForeground(Color.blue);
+          lasthost = host;
         }
-        hostLabels.addElement(host + service.serviceType+service.getActionText());
+        hostLabels.addElement(host + service.serviceType+service.getActionText() );
+        // hostLabels.addElement(host + (bytype ? service.serviceType+service.getActionText() : ""));
       }
       msacl.attachWSMenuEntry(atpoint, service, alignFrame);
       /*