JAL-3253 jalview.bin.Instance handles all singleton instances -
[jalview.git] / src / jalview / analysis / AlignmentSorter.java
index b764787..459d09d 100755 (executable)
@@ -22,7 +22,7 @@ package jalview.analysis;
 
 import jalview.analysis.scoremodels.PIDModel;
 import jalview.analysis.scoremodels.SimilarityParams;
-import jalview.bin.Jalview;
+import jalview.bin.Instance;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.AlignmentOrder;
@@ -55,6 +55,10 @@ import java.util.List;
 public class AlignmentSorter
 {
 
+  private AlignmentSorter()
+  {
+    // singleton
+  }
   /**
    * types of feature ordering: Sort by score : average score - or total score -
    * over all features in region Sort by feature label text: (or if null -
@@ -69,7 +73,7 @@ public class AlignmentSorter
 
   public static AlignmentSorter getInstance()
   {
-    Jalview j = Jalview.getInstance();
+    Instance j = Instance.getInstance();
     return (j.alignmentSorter == null
             ? j.alignmentSorter = new AlignmentSorter()
             : j.alignmentSorter);