JAL-2759 Rename hideInsertionsFor to hideList, after review
authorkiramt <k.mourao@dundee.ac.uk>
Mon, 15 Jan 2018 13:38:56 +0000 (13:38 +0000)
committerkiramt <k.mourao@dundee.ac.uk>
Mon, 15 Jan 2018 13:38:56 +0000 (13:38 +0000)
src/jalview/datamodel/Alignment.java
src/jalview/datamodel/HiddenColumns.java
src/jalview/io/AnnotationFile.java
test/jalview/datamodel/HiddenColumnsTest.java

index f052c05..7cc2125 100755 (executable)
@@ -1920,7 +1920,7 @@ public class Alignment implements AlignmentI
     SequenceI repseq = getSequenceAt(0);
     setSeqrep(repseq);
     HiddenColumns cs = new HiddenColumns();
-    cs.hideInsertionsFor(repseq.getInsertions());
+    cs.hideList(repseq.getInsertions());
     setHiddenColumns(cs);
   }
 }
index 2b5185f..4a1a9a3 100644 (file)
@@ -300,17 +300,16 @@ public class HiddenColumns
   }
 
   /**
-   * mark the columns corresponding to gap characters as hidden in the column
-   * selection
+   * hide a list of ranges
    * 
-   * @param insertions
+   * @param ranges
    */
-  public void hideInsertionsFor(List<int[]> inserts)
+  public void hideList(List<int[]> ranges)
   {
     try
     {
       LOCK.writeLock().lock();
-      for (int[] r : inserts)
+      for (int[] r : ranges)
       {
         hideColumns(r[0], r[1]);
       }
index 885a298..e578a45 100755 (executable)
@@ -968,7 +968,7 @@ public class AnnotationFile
             else
             {
               // consider deferring this till after the file has been parsed ?
-              hidden.hideInsertionsFor(sr.getInsertions());
+              hidden.hideList(sr.getInsertions());
             }
           }
           modified = true;
index a31d527..e6c9b32 100644 (file)
@@ -420,7 +420,7 @@ public class HiddenColumnsTest
             new SequenceI[]
     { new Sequence("refseqGaptest", "KTDVTI----------NFI-----G----L") });
     HiddenColumns cs = new HiddenColumns();
-    cs.hideInsertionsFor(al.getSequenceAt(0).getInsertions());
+    cs.hideList(al.getSequenceAt(0).getInsertions());
     assertEquals("G", ""
             + al.getSequenceAt(0).getCharAt(cs.visibleToAbsoluteColumn(9)));
 
@@ -1139,10 +1139,10 @@ public class HiddenColumnsTest
     SequenceI seq1 = new Sequence("TEST1", "GAL---MFW-KQESPVICY--HRNDT");
     SequenceI seq2 = new Sequence("TEST1", "GALMFWKQESPVICYHRNDT");
 
-    h.hideInsertionsFor(seq2.getInsertions());
+    h.hideList(seq2.getInsertions());
     assertTrue(h.equals(h2));
 
-    h.hideInsertionsFor(seq1.getInsertions());
+    h.hideList(seq1.getInsertions());
     h2.hideColumns(3, 5);
     h2.hideColumns(9, 9);
     h2.hideColumns(19, 20);