JAL-653 code tidy / tests for 'realise gff mappings'
[jalview.git] / src / jalview / gui / AlignViewport.java
index 5944b80..9ee88db 100644 (file)
@@ -863,17 +863,6 @@ public class AlignViewport extends AlignmentViewport implements
      */
     if (Cache.getDefault(Preferences.ENABLE_SPLIT_FRAME, true))
     {
-      // if (toAdd.getDataset() == null)
-      // {
-      // // need to create ds seqs
-      // for (SequenceI sq : toAdd.getSequences())
-      // {
-      // if (sq.getDatasetSequence() == null)
-      // {
-      // sq.createDatasetSequence();
-      // }
-      // }
-      // }
       if (AlignmentUtils.isMappable(toAdd, getAlignment()))
       {
         if (openLinkedAlignment(toAdd, title))
@@ -919,9 +908,9 @@ public class AlignViewport extends AlignmentViewport implements
   }
 
   /**
-   * If the alignment holds any mappings to a dummy (placeholder) sequence that
-   * matches the given sequence, then update the mapping to point to the
-   * sequence. Returns the number of mappings updated.
+   * If the alignment holds any mappings to a virtual (placeholder) sequence
+   * that matches all or part of the given sequence, then update the mapping to
+   * point to the sequence. Returns the number of mappings updated.
    * 
    * @param al
    * @param seq
@@ -930,8 +919,7 @@ public class AlignViewport extends AlignmentViewport implements
   protected int realiseMappingsTo(AlignmentI al, SequenceI seq)
   {
     int count = 0;
-    Set<AlignedCodonFrame> mappings = al.getDataset().getCodonFrames();
-    // TODO are mappings on alignment or alignment dataset?!?
+    Set<AlignedCodonFrame> mappings = al.getCodonFrames();
     for (AlignedCodonFrame mapping : mappings)
     {
       /*