From: jprocter Date: Sun, 19 Sep 2010 22:36:33 +0000 (+0000) Subject: cache the runner config so the preset list can be retrieved quickly X-Git-Tag: Release_2_6~26 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=9e9b624ed84ec54b959e05a0ab8554416525f4e2;p=jalview.git cache the runner config so the preset list can be retrieved quickly --- diff --git a/src/jalview/ws/jws2/Jws2Discoverer.java b/src/jalview/ws/jws2/Jws2Discoverer.java index d39b6b1..d6e4d78 100644 --- a/src/jalview/ws/jws2/Jws2Discoverer.java +++ b/src/jalview/ws/jws2/Jws2Discoverer.java @@ -280,7 +280,23 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI public String getUri() { // this is only valid for Jaba 1.0 - this formula might have to change! - return hosturl+"/"+serviceType; + return hosturl+(hosturl.lastIndexOf("/")==(hosturl.length()-1) ? "/" : "") +serviceType; + } + private boolean hasParams=false,lookedForParams=false; + public boolean hasParameters() + { + if (!lookedForParams) + { + lookedForParams=true; + try + { + hasParams = (getRunnerConfig().getArguments().size() > 0); + } catch (Exception e) + { + + } + } + return hasParams; } }; diff --git a/src/jalview/ws/jws2/MsaWSClient.java b/src/jalview/ws/jws2/MsaWSClient.java index 2e5ef28..2453ac0 100644 --- a/src/jalview/ws/jws2/MsaWSClient.java +++ b/src/jalview/ws/jws2/MsaWSClient.java @@ -271,14 +271,7 @@ public class MsaWSClient extends Jws2Client rmsawsmenu.add(msawsmenu); calcName = ""; } - boolean hasparams = false; - try - { - hasparams = (service.getRunnerConfig().getArguments().size() > 0); - } catch (Exception e) - { - - } + boolean hasparams = service.hasParameters(); do { if (submitGaps == true)