From 9a68d6293a1d0ded59716fa34826fb4af793c330 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Thu, 26 Jul 2018 13:37:39 +0100 Subject: [PATCH] JAL-3070 pull up setWebService and alignFrame reference --- src/jalview/ws/WSClient.java | 25 +++++++++++++++++++++++++ src/jalview/ws/jws1/MsaWSClient.java | 2 -- src/jalview/ws/jws1/SeqSearchWSClient.java | 2 -- src/jalview/ws/jws2/Jws2Client.java | 23 ----------------------- 4 files changed, 25 insertions(+), 27 deletions(-) diff --git a/src/jalview/ws/WSClient.java b/src/jalview/ws/WSClient.java index 0f5cee8..68bd4b0 100755 --- a/src/jalview/ws/WSClient.java +++ b/src/jalview/ws/WSClient.java @@ -20,7 +20,9 @@ */ package jalview.ws; +import jalview.gui.AlignFrame; import jalview.gui.WebserviceInfo; +import jalview.ws.api.UIinfo; public abstract class WSClient // implements WSMenuEntryProviderI { @@ -65,6 +67,11 @@ public abstract class WSClient // implements WSMenuEntryProviderI * mappings between abstract interface names and menu entries */ protected java.util.Hashtable ServiceActions; + + /** + * alignFrame associated with this client + */ + protected AlignFrame alignFrame; { ServiceActions = new java.util.Hashtable(); ServiceActions.put("MsaWS", "Multiple Sequence Alignment"); @@ -74,4 +81,22 @@ public abstract class WSClient // implements WSMenuEntryProviderI public WSClient() { } + + protected WebserviceInfo setWebService(UIinfo serv, boolean b) + { + WebServiceName = serv.getName(); + WebServiceJobTitle = serv.getActionText(); + WsURL = serv.getHostURL(); + if (!b) + { + return new WebserviceInfo(WebServiceJobTitle, + WebServiceJobTitle + " using service hosted at " + + WsURL + "\n" + + (serv.getDescription() != null + ? serv.getDescription() + : ""), + false); + } + return null; + } } diff --git a/src/jalview/ws/jws1/MsaWSClient.java b/src/jalview/ws/jws1/MsaWSClient.java index 4a09625..e627699 100644 --- a/src/jalview/ws/jws1/MsaWSClient.java +++ b/src/jalview/ws/jws1/MsaWSClient.java @@ -51,8 +51,6 @@ public class MsaWSClient extends WS1Client */ ext.vamsas.MuscleWS server; - AlignFrame alignFrame; - /** * Creates a new MsaWSClient object that uses a service given by an externally * retrieved ServiceHandle diff --git a/src/jalview/ws/jws1/SeqSearchWSClient.java b/src/jalview/ws/jws1/SeqSearchWSClient.java index 53338d3..49de37e 100644 --- a/src/jalview/ws/jws1/SeqSearchWSClient.java +++ b/src/jalview/ws/jws1/SeqSearchWSClient.java @@ -56,8 +56,6 @@ public class SeqSearchWSClient extends WS1Client */ ext.vamsas.SeqSearchI server; - AlignFrame alignFrame; - /** * Creates a new MsaWSClient object that uses a service given by an externally * retrieved ServiceHandle diff --git a/src/jalview/ws/jws2/Jws2Client.java b/src/jalview/ws/jws2/Jws2Client.java index dfa7598..f233030 100644 --- a/src/jalview/ws/jws2/Jws2Client.java +++ b/src/jalview/ws/jws2/Jws2Client.java @@ -25,10 +25,8 @@ import jalview.bin.Cache; import jalview.gui.AlignFrame; import jalview.gui.Desktop; import jalview.gui.JvSwingUtils; -import jalview.gui.WebserviceInfo; import jalview.gui.WsJobParameters; import jalview.util.MessageManager; -import jalview.ws.api.UIinfo; import jalview.ws.jws2.dm.AAConSettings; import jalview.ws.jws2.dm.JabaWsParamSet; import jalview.ws.jws2.jabaws2.Jws2Instance; @@ -57,8 +55,6 @@ import compbio.metadata.Argument; */ public abstract class Jws2Client extends jalview.ws.WSClient { - protected AlignFrame alignFrame; - protected WsParamSetI preset; protected List paramset; @@ -150,25 +146,6 @@ public abstract class Jws2Client extends jalview.ws.WSClient // anonymous constructor - used for headless method calls only } - protected WebserviceInfo setWebService(UIinfo serv, boolean b) - { - // TODO pullup - WebServiceName = serv.getName(); - WebServiceJobTitle = serv.getActionText(); - WsURL = serv.getHostURL(); - if (!b) - { - return new WebserviceInfo(WebServiceJobTitle, - WebServiceJobTitle + " using service hosted at " - + WsURL + "\n" - + (serv.getDescription() != null - ? serv.getDescription() - : ""), - false); - } - return null; - } - /* * Jws2Instance serviceHandle; (non-Javadoc) * -- 1.7.10.2