JAL-1479 refactored DBRef fetching code to StructureChooser to enable applet build
authortcofoegbu <tcnofoegbu@dundee.ac.uk>
Wed, 25 Nov 2015 15:29:41 +0000 (15:29 +0000)
committertcofoegbu <tcnofoegbu@dundee.ac.uk>
Wed, 25 Nov 2015 15:29:41 +0000 (15:29 +0000)
src/jalview/gui/StructureChooser.java
src/jalview/ws/sifts/SiftsClient.java

index c86a90f..720dc9e 100644 (file)
@@ -776,6 +776,9 @@ public class StructureChooser extends GStructureChooser
           final AlignmentPanel alignPanel, final SequenceI[] sequences)
   {
     final StructureViewer sViewer = new StructureViewer(ssm);
+
+    new jalview.ws.DBRefFetcher(sequences, null, null, null, false)
+            .fetchDBRefs(true);
     new Thread(new Runnable()
     {
       @Override
@@ -786,8 +789,6 @@ public class StructureChooser extends GStructureChooser
           ArrayList<SequenceI[]> seqsMap = new ArrayList<SequenceI[]>();
           for (SequenceI seq : sequences)
           {
-            new jalview.ws.DBRefFetcher(new SequenceI[] { seq }, null,
-                    null, null, false).fetchDBRefs(true);
             seqsMap.add(new SequenceI[] { seq });
           }
           SequenceI[][] collatedSeqs = seqsMap.toArray(new SequenceI[0][0]);
index 32bb7b7..00da2fc 100644 (file)
@@ -318,14 +318,6 @@ public class SiftsClient implements SiftsClientI
     else
     {
       DBRefEntry[] dbRefs = seq.getDBRefs();
-      // if (dbRefs == null || dbRefs.length < 1)
-      // {
-      // // final SequenceI[] seqs = new SequenceI[] { seq };
-      // // new jalview.ws.DBRefFetcher(seqs, null, null, null, false)
-      // // .fetchDBRefs(true);
-      // dbRefs = seq.getDBRefs();
-      // }
-
       if (dbRefs == null || dbRefs.length < 1)
       {
         throw new SiftsException("Could not get source DB Ref");