JAL-3210 Improvements to eclipse detection. New src tree and SwingJS updated from...
[jalview.git] / src / jalview / ws / DBRefFetcher.java
index 241f443..7745b74 100644 (file)
@@ -32,6 +32,7 @@ import jalview.gui.Desktop;
 import jalview.gui.FeatureSettings;
 import jalview.gui.IProgressIndicator;
 import jalview.gui.OOMWarning;
+import jalview.gui.Preferences;
 import jalview.util.DBRefUtils;
 import jalview.util.MessageManager;
 import jalview.ws.seqfetcher.DbSourceProxy;
@@ -134,7 +135,7 @@ public class DBRefFetcher implements Runnable
     }
     this.dataset = ds;
     // TODO Jalview 2.5 lots of this code should be in the gui package!
-    sfetcher = jalview.gui.SequenceFetcher.getSequenceFetcherSingleton();
+    sfetcher = SequenceFetcher.getInstance();
     // set default behaviour for transferring excess sequence data to the
     // dataset
     trimDsSeqs = Cache.getDefault(TRIM_RETRIEVED_SEQUENCES, true);
@@ -302,7 +303,7 @@ public class DBRefFetcher implements Runnable
     }
     try
     {
-      if (Cache.getDefault("DBREFFETCH_USEPICR", false))
+      if (Cache.getDefault(Preferences.DBREFFETCH_USEPICR, false))
       {
         picrClient = new AccessionMapperServiceLocator()
                 .getAccessionMapperPort();
@@ -756,8 +757,6 @@ public class DBRefFetcher implements Runnable
         // and remove it from the rest
         // TODO: decide if we should remove annotated sequence from set
         sdataset.remove(sequence);
-        // TODO: should we make a note of sequences that have received new DB
-        // ids, so we can query all enabled DAS servers for them ?
       }
     }
     return modified;
@@ -787,7 +786,9 @@ public class DBRefFetcher implements Runnable
   {
        int n;
        if (sequencesArray == null || (n = sequencesArray.length) == 0)
-         return sequencesArray;
+  {
+    return sequencesArray;
+  }
     ArrayList<SequenceI> nseq = new ArrayList<>();
     for (int i = 0;i < n; i++)
     {