JAL-3070 remove final reference to Jws2Instance
authorJim Procter <jprocter@issues.jalview.org>
Wed, 10 Jul 2019 16:33:25 +0000 (17:33 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Wed, 10 Jul 2019 16:33:25 +0000 (17:33 +0100)
src/jalview/ws/jws2/Jws2Client.java
src/jalview/ws/jws2/MsaWSClient.java

index b4d498d..1c13891 100644 (file)
@@ -25,6 +25,7 @@ import jalview.bin.Cache;
 import jalview.gui.AlignFrame;
 import jalview.gui.JvSwingUtils;
 import jalview.util.MessageManager;
+import jalview.ws.api.ServiceWithParameters;
 import jalview.ws.jws2.dm.AAConSettings;
 import jalview.ws.jws2.dm.JabaWsParamSet;
 import jalview.ws.jws2.jabaws2.Jws2Instance;
@@ -102,13 +103,15 @@ public abstract class Jws2Client extends jalview.ws.WSClient
    * @param service
    * @param alignFrame
    */
-  abstract void attachWSMenuEntry(JMenu wsmenu, final Jws2Instance service,
+  abstract void attachWSMenuEntry(JMenu wsmenu,
+          final ServiceWithParameters service,
           final AlignFrame alignFrame);
 
   static boolean registerAAConWSInstance(final JMenu wsmenu,
-          final Jws2Instance service, final AlignFrame alignFrame)
+          final ServiceWithParameters service, final AlignFrame alignFrame)
   {
-    final AlignAnalysisUIText aaui = service.getAlignAnalysisUI(); // null ; //
+    Jws2Instance jaba_service = (Jws2Instance) service;
+    final AlignAnalysisUIText aaui = jaba_service.getAlignAnalysisUI(); // null ; //
                                                                    // AlignAnalysisUIText.aaConGUI.get(service.serviceType.toString());
     if (aaui == null)
     {
@@ -146,7 +149,7 @@ public abstract class Jws2Client extends jalview.ws.WSClient
             // public void run()
             {
               removeCurrentAAConWorkerFor(aaui, alignFrame);
-              buildCurrentAAConWorkerFor(aaui, alignFrame, service);
+              buildCurrentAAConWorkerFor(aaui, alignFrame, jaba_service);
             }
           } // );
         }
index 7a3d9d3..83d6d16 100644 (file)
@@ -32,7 +32,6 @@ import jalview.ws.api.JalviewServiceEndpointProviderI;
 import jalview.ws.api.MultipleSequenceAlignmentI;
 import jalview.ws.api.ServiceWithParameters;
 import jalview.ws.gui.MsaWSThread;
-import jalview.ws.jws2.jabaws2.Jws2Instance;
 import jalview.ws.params.ArgumentI;
 import jalview.ws.params.WsParamSetI;
 
@@ -235,9 +234,10 @@ public class MsaWSClient extends Jws2Client implements WSMenuEntryProviderI
 
   @Override
   public void attachWSMenuEntry(JMenu rmsawsmenu,
-          final Jws2Instance service, final AlignFrame alignFrame)
+          final ServiceWithParameters service, final AlignFrame alignFrame)
   {
-    if (registerAAConWSInstance(rmsawsmenu, service, alignFrame))
+    if (registerAAConWSInstance(rmsawsmenu, service,
+            alignFrame))
     {
       // Alignment dependent analysis calculation WS gui
       return;