Jalview 2.8 Source Header
[jalview.git] / src / jalview / io / vamsas / Sequencemapping.java
index 55a4fe7..9ac0ae5 100644 (file)
@@ -1,13 +1,13 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
+ * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle
  * 
  * This file is part of Jalview.
  * 
  * Jalview is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License 
  * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
- * 
+ *  
  * Jalview is distributed in the hope that it will be useful, but 
  * WITHOUT ANY WARRANTY; without even the implied warranty 
  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
@@ -22,6 +22,7 @@ import java.util.Vector;
 import jalview.datamodel.AlignedCodonFrame;
 import jalview.datamodel.Mapping;
 import jalview.datamodel.SequenceI;
+import jalview.gui.Desktop;
 import jalview.io.VamsasAppDatastore;
 import uk.ac.vamsas.client.Vobject;
 import uk.ac.vamsas.objects.core.AlignmentSequence;
@@ -346,9 +347,9 @@ public class Sequencemapping extends Rangetype
       if (!sense)
       {
         mapping = this.parsemapType(sequenceMapping, 1, 3); // invert sense
-        mapping = new jalview.util.MapList(mapping.getToRanges(), mapping
-                .getFromRanges(), mapping.getToRatio(), mapping
-                .getFromRatio());
+        mapping = new jalview.util.MapList(mapping.getToRanges(),
+                mapping.getFromRanges(), mapping.getToRatio(),
+                mapping.getFromRatio());
         afc.addMap(to, from, mapping);
       }
       else
@@ -364,7 +365,7 @@ public class Sequencemapping extends Rangetype
     }
     bindjvvobj(mapping, sequenceMapping);
     jalview.structure.StructureSelectionManager
-            .getStructureSelectionManager().addMappings(
+            .getStructureSelectionManager(Desktop.instance).addMappings(
                     new AlignedCodonFrame[]
                     { afc });
     // Try to link up any conjugate database references in the two sequences