JAL-4366 revive broken alignDNAasDNA test
[jalview.git] / src / jalview / structures / models / AAStructureBindingModel.java
index 55955a8..4f29096 100644 (file)
@@ -885,7 +885,7 @@ public abstract class AAStructureBindingModel
       {
         for (int s : cs.getSelected())
         {
-            matched.set(s);
+          matched.set(s);
         }
       }
       else
@@ -1428,7 +1428,7 @@ public abstract class AAStructureBindingModel
               lastChain = chain;
             }
             // final colour range
-            if (lastColour != null)
+            if (lastColour != null && startPos!=-1)
             {
               addAtomSpecRange(colourMap, lastColour, modelId, startPos,
                       lastPos, lastChain);
@@ -1540,7 +1540,6 @@ public abstract class AAStructureBindingModel
     return f;
   }
 
-
   /**
    * Use restoreSession when you want to restore a previously saved sesssion to
    * the running viewer instance.
@@ -1550,7 +1549,8 @@ public abstract class AAStructureBindingModel
   public void restoreSession(String absolutePath)
   {
     String prefix = getViewerType().toString();
-    try {
+    try
+    {
 
       StructureCommandI cmd = commandGenerator.restoreSession(absolutePath);
       if (cmd != null)
@@ -2008,17 +2008,26 @@ public abstract class AAStructureBindingModel
     return 0;
   }
 
-  public List<String> getHetatmNames() {
-    return Collections.EMPTY_LIST;
+  /**
+   * list the ligands available for display/hiding in the current view
+   * 
+   * @return HETATM CODE:Molecule name
+   */
+  public Map<String, String> getHetatmNames()
+  {
+    return Collections.EMPTY_MAP;
   }
+
   /**
    * Generates and executes a command to show the given hetatm types as CPK
    * 
-   * @param toShow - one or more of strings from getHetatmNames
+   * @param toShow
+   *          - one or more of strings from getHetatmNames
    */
   public void showHetatms(List<String> toShow)
   {
-    executeCommands(commandGenerator.showHetatms(toShow), false, "Adjusting hetatm visibility");
+    executeCommands(commandGenerator.showHetatms(toShow), false,
+            "Adjusting hetatm visibility");
   }
 
 }