JAL-4090 JAL-1551 spotlessApply
[jalview.git] / src / jalview / ext / jmol / JalviewJmolBinding.java
index f51252c..93a5633 100644 (file)
@@ -156,7 +156,7 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel
     jmolHistory(false);
     if (lastCommand == null || !lastCommand.equals(cmd))
     {
-      jmolScript(cmd + "\n",command.isWaitNeeded());
+      jmolScript(cmd + "\n", command.isWaitNeeded());
     }
     jmolHistory(true);
     lastCommand = cmd;
@@ -186,19 +186,19 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel
 
   // End StructureListener
   // //////////////////////////
-  
+
   ////////////////////////////
   // HETATM get
   //
-  
+
   @Override
-  public Map<String,String> getHetatmNames()
+  public Map<String, String> getHetatmNames()
   {
-    HashMap<String,String> hetlist=new HashMap();
-    for (int mc=0;mc<jmolViewer.ms.mc; mc++)
+    HashMap<String, String> hetlist = new HashMap();
+    for (int mc = 0; mc < jmolViewer.ms.mc; mc++)
     {
-      Map<String,String> hets = jmolViewer.ms.getHeteroList(mc);
-      if (hets!=null)
+      Map<String, String> hets = jmolViewer.ms.getHeteroList(mc);
+      if (hets != null)
       {
         hetlist.putAll(hets);
       }
@@ -207,7 +207,7 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel
   }
   //
   ////////////////////////////
-  
+
   @Override
   public float[][] functionXY(String functionName, int x, int y)
   {
@@ -295,21 +295,24 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel
         jmolScript(resetLastRes.toString());
         resetLastRes.setLength(0);
       }
-      StringBuilder highlightCommands=null;
+      StringBuilder highlightCommands = null;
       for (AtomSpec atom : atoms)
       {
-        StringBuilder thisAtom = highlightAtom(atom.getAtomIndex(), atom.getPdbResNum(),
-                atom.getChain(), atom.getPdbFile());
-        if (thisAtom!=null) {
-          if (highlightCommands==null)
+        StringBuilder thisAtom = highlightAtom(atom.getAtomIndex(),
+                atom.getPdbResNum(), atom.getChain(), atom.getPdbFile());
+        if (thisAtom != null)
+        {
+          if (highlightCommands == null)
+          {
+            highlightCommands = thisAtom;
+          }
+          else
           {
-            highlightCommands=thisAtom;                  
-          } else {
             highlightCommands.append(thisAtom);
           }
         }
       }
-      if (highlightCommands!=null)
+      if (highlightCommands != null)
       {
         jmolHistory(false);
         jmolScript(highlightCommands.toString());
@@ -343,8 +346,8 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel
   }
 
   // jmol/ssm only
-  private StringBuilder highlightAtom(int atomIndex, int pdbResNum, String chain,
-          String pdbfile)
+  private StringBuilder highlightAtom(int atomIndex, int pdbResNum,
+          String chain, String pdbfile)
   {
     String modelId = getModelIdForFile(pdbfile);
     if (modelId.isEmpty())
@@ -510,8 +513,9 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel
     lastMessage = strInfo;
     if (data != null)
     {
-      jalview.bin.Console.errPrintln("Ignoring additional hover info: " + data
-              + " (other info: '" + strInfo + "' pos " + atomIndex + ")");
+      jalview.bin.Console.errPrintln(
+              "Ignoring additional hover info: " + data + " (other info: '"
+                      + strInfo + "' pos " + atomIndex + ")");
     }
     mouseOverStructure(atomIndex, strInfo);
   }
@@ -531,7 +535,8 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel
      */
     if (strData != null)
     {
-      jalview.bin.Console.errPrintln("Ignoring additional pick data string " + strData);
+      jalview.bin.Console.errPrintln(
+              "Ignoring additional pick data string " + strData);
     }
     int chainSeparator = strInfo.indexOf(":");
     int p = 0;
@@ -649,7 +654,8 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel
       }
     } catch (Exception e)
     {
-      jalview.bin.Console.errPrintln("Squashed Jmol callback handler error:");
+      jalview.bin.Console
+              .errPrintln("Squashed Jmol callback handler error:");
       e.printStackTrace();
     }
   }
@@ -898,8 +904,9 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel
   public void setCallbackFunction(String callbackType,
           String callbackFunction)
   {
-    jalview.bin.Console.errPrintln("Ignoring set-callback request to associate "
-            + callbackType + " with function " + callbackFunction);
+    jalview.bin.Console
+            .errPrintln("Ignoring set-callback request to associate "
+                    + callbackType + " with function " + callbackFunction);
 
   }
 
@@ -972,7 +979,8 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel
           String buttonsToShow)
   {
 
-    jalview.bin.Console.errPrintln("Allocating Jmol Viewer: " + commandOptions);
+    jalview.bin.Console
+            .errPrintln("Allocating Jmol Viewer: " + commandOptions);
 
     if (commandOptions == null)
     {
@@ -990,8 +998,9 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel
       console = createJmolConsole(consolePanel, buttonsToShow);
     } catch (Throwable e)
     {
-      jalview.bin.Console.errPrintln("Could not create Jmol application console. "
-              + e.getMessage());
+      jalview.bin.Console
+              .errPrintln("Could not create Jmol application console. "
+                      + e.getMessage());
       e.printStackTrace();
     }
     if (consolePanel != null)