SlivkaWSDiscoverer formatting fix
authorMateusz Warowny <mmzwarowny@dundee.ac.uk>
Mon, 23 Sep 2019 15:01:34 +0000 (16:01 +0100)
committerMateusz Warowny <mmzwarowny@dundee.ac.uk>
Mon, 23 Sep 2019 15:01:34 +0000 (16:01 +0100)
src/jalview/ws/slivkaws/SlivkaWSDiscoverer.java

index 54cfbc4..e9d0d53 100644 (file)
@@ -16,13 +16,14 @@ import javax.swing.JMenuItem;
 import uk.ac.dundee.compbio.slivkaclient.SlivkaClient;
 import uk.ac.dundee.compbio.slivkaclient.SlivkaService;
 
-public class SlivkaWSDiscoverer
-  implements Runnable, WSMenuEntryProviderI
+public class SlivkaWSDiscoverer implements Runnable, WSMenuEntryProviderI
 {
   private static SlivkaWSDiscoverer instance = null;
+
   private SlivkaClient client;
 
-  private SlivkaWSDiscoverer() {
+  private SlivkaWSDiscoverer()
+  {
     try
     {
       client = new SlivkaClient("gjb-www-1.cluster.lifesci.dundee.ac.uk", 3203);
@@ -34,9 +35,10 @@ public class SlivkaWSDiscoverer
 
   public static SlivkaWSDiscoverer getInstance()
   {
-    if (instance == null) {
-               instance = new SlivkaWSDiscoverer();
-       }
+    if (instance == null)
+    {
+      instance = new SlivkaWSDiscoverer();
+    }
     return instance;
   }
 
@@ -50,10 +52,14 @@ public class SlivkaWSDiscoverer
 
     try
     {
-      for (SlivkaService service: client.getServices()) {
-        msaClassifier: {
-          for (String classifier: service.classifiers) {
-            if (classifier.contains("Multiple sequence alignment")) {
+      for (SlivkaService service : client.getServices())
+      {
+        msaClassifier:
+        {
+          for (String classifier : service.classifiers)
+          {
+            if (classifier.contains("Multiple sequence alignment"))
+            {
               break msaClassifier;
             }
           }
@@ -63,25 +69,23 @@ public class SlivkaWSDiscoverer
         JMenuItem defaultEntry = new JMenuItem(String.format("%s with defaults", service.label));
         defaultEntry.addActionListener((ActionEvent evt) -> {
           AlignmentView msa = alignFrame.gatherSequencesForAlignment();
-          if (msa != null) {
-            new MsaWSClient(
-                instance, alignFrame.getTitle(), msa, false, true,
-                alignFrame.getViewport().getAlignment().getDataset(),
-                alignFrame
-            );
+          if (msa != null)
+          {
+            new MsaWSClient(instance, alignFrame.getTitle(), msa, false, true,
+                alignFrame.getViewport().getAlignment().getDataset(), alignFrame);
           }
         });
         categoryMenu.add(defaultEntry);
-        
+
         JMenuItem customEntry = new JMenuItem(String.format("%s with custom parameters", service.label));
         customEntry.addActionListener((ActionEvent evt) -> {
           AlignmentView msa = alignFrame.gatherSequencesForAlignment();
-          if (msa != null) {
+          if (msa != null)
+          {
             try
             {
-            SlivkaParamSet paramSet = new SlivkaParamSet(service);
-              new MsaWSClient(
-                  instance, paramSet, null, true, alignFrame.getTitle(), msa, false, true,
+              SlivkaParamSet paramSet = new SlivkaParamSet(service);
+              new MsaWSClient(instance, paramSet, null, true, alignFrame.getTitle(), msa, false, true,
                   alignFrame.getViewport().getAlignment().getDataset(), alignFrame);
             } catch (IOException exc)
             {
@@ -90,7 +94,7 @@ public class SlivkaWSDiscoverer
           }
         });
         categoryMenu.add(customEntry);
-        
+
         categoryMenu.addSeparator();
       }
     } catch (IOException e)