JAL-4134 only build tree when showing it in the tree viewer..
[jalview.git] / src / jalview / ws / dbsources / EBIAlfaFold.java
index 5165d04..5ab05e0 100644 (file)
@@ -44,6 +44,7 @@ import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.ContactMatrixI;
 import jalview.datamodel.DBRefEntry;
+import jalview.datamodel.GroupSet;
 import jalview.datamodel.PDBEntry;
 import jalview.datamodel.SequenceFeature;
 import jalview.datamodel.SequenceI;
@@ -314,6 +315,8 @@ public class EBIAlfaFold extends EbiFileRetrievedProxy
 
     if (isStruct)
     {
+      // ###### WRITE A TEST for this bit of the logic addAlphaFoldPAE with
+      // different params.
       StructureSelectionManager ssm = StructureSelectionManager
               .getStructureSelectionManager(Desktop.instance);
       if (ssm != null)
@@ -473,6 +476,7 @@ public class EBIAlfaFold extends EbiFileRetrievedProxy
     return paeDict;
   }
 
+  // ###### TEST THIS
   public static boolean importPaeJSONAsContactMatrixToStructure(
           StructureMapping[] smArray, InputStream paeInput, String label)
           throws IOException, ParseException
@@ -498,17 +502,13 @@ public class EBIAlfaFold extends EbiFileRetrievedProxy
       return false;
     }
 
-    ContactMatrixI matrix = new PAEContactMatrix(sm.getSequence(),
+    SequenceI seq = sm.getSequence();
+    ContactMatrixI matrix = new PAEContactMatrix(seq,
             (Map<String, Object>) pae_obj);
-
     AlignmentAnnotation cmannot = sm.getSequence().addContactList(matrix);
-    if (label != null)
-    {
-      Console.debug("Setting annotation label to '" + label + "'");
-      cmannot.label = label;
-    }
-    sm.getSequence().addAlignmentAnnotation(cmannot);
-
+    /* this already happens in Sequence.addContactList()
+     seq.addAlignmentAnnotation(cmannot);
+     */
     return true;
   }