JAL-281 added initialising trees to FileLoader if fileformat is treefile
authorkjvdheide <kjvanderheide@dundee.ac.uk>
Wed, 17 Jan 2018 16:21:27 +0000 (16:21 +0000)
committerkjvdheide <kjvanderheide@dundee.ac.uk>
Wed, 17 Jan 2018 16:21:27 +0000 (16:21 +0000)
src/jalview/io/FileLoader.java

index 6735a80..8e7de3f 100755 (executable)
@@ -30,6 +30,7 @@ import jalview.datamodel.AlignmentI;
 import jalview.datamodel.HiddenColumns;
 import jalview.datamodel.PDBEntry;
 import jalview.datamodel.SequenceI;
+import jalview.ext.archaeopteryx.AptxInit;
 import jalview.gui.AlignFrame;
 import jalview.gui.AlignViewport;
 import jalview.gui.Desktop;
@@ -441,6 +442,13 @@ public class FileLoader implements Runnable
               alignFrame.getViewport()
                       .applyFeaturesStyle(proxyColourScheme);
             }
+            if (format.isTreeFile())
+            {
+              // make generic instead of Aptx specific?
+              AptxInit.createInstancesFromFile(file,
+                      alignFrame.getViewport());
+
+            }
             alignFrame.statusBar.setText(MessageManager.formatMessage(
                     "label.successfully_loaded_file", new String[]
                     { title }));
@@ -456,6 +464,7 @@ public class FileLoader implements Runnable
                       AlignFrame.DEFAULT_WIDTH, AlignFrame.DEFAULT_HEIGHT);
             }
 
+
             try
             {
               alignFrame.setMaximum(jalview.bin.Cache