Merge branch 'kjvdh/features/PhylogenyViewer' of
[jalview.git] / src / jalview / ext / forester / io / TreeParser.java
@@ -1,8 +1,9 @@
 package jalview.ext.forester.io;
 
-import jalview.ext.archaeopteryx.AptxBinding;
-import jalview.ext.archaeopteryx.AptxNodeAssociation;
-import jalview.ext.archaeopteryx.ArchaeopteryxInit;
+import jalview.ext.archaeopteryx.AptxInit;
+import jalview.ext.archaeopteryx.JalviewBinding;
+import jalview.ext.archaeopteryx.LoadedTreeAssociation;
+import jalview.ext.treeviewer.ExternalTreeParserI;
 import jalview.gui.Desktop;
 import jalview.gui.JvOptionPane;
 import jalview.util.MessageManager;
@@ -15,13 +16,13 @@ import org.forester.archaeopteryx.Archaeopteryx;
 import org.forester.archaeopteryx.MainFrame;
 import org.forester.util.ForesterUtil;
 
-public class ForesterTreeParser implements ExternalTreeParserI<MainFrame>
+public class TreeParser implements ExternalTreeParserI<MainFrame>
 {
   private final String filePath;
 
   private final File file;
 
-  public ForesterTreeParser(final String treeFilePath)
+  public TreeParser(final String treeFilePath)
   {
     final String possibleError = ForesterUtil.isReadableFile(treeFilePath);
     if (possibleError != null)
@@ -37,7 +38,7 @@ public class ForesterTreeParser implements ExternalTreeParserI<MainFrame>
 
   }
 
-  public ForesterTreeParser(final File treeFile) throws IOException
+  public TreeParser(final File treeFile) throws IOException
   {
     final String possibleError = ForesterUtil.isReadableFile(treeFile);
     if (possibleError != null)
@@ -58,15 +59,16 @@ public class ForesterTreeParser implements ExternalTreeParserI<MainFrame>
         "_aptx_jalview_configuration_file", filePath };
     MainFrame aptx = Archaeopteryx.main(AptxArgs);
 
-    AptxNodeAssociation bindAptxNodes = new AptxNodeAssociation(
+    LoadedTreeAssociation bindAptxNodes = new LoadedTreeAssociation(
             viewport.getAlignment().getSequencesArray(),
             aptx.getMainPanel().getCurrentTreePanel().getPhylogeny());
 
     bindAptxNodes.associateLeavesToSequences();
-    new AptxBinding(aptx, viewport, bindAptxNodes.getAlignmentWithNodes(),
+
+    new JalviewBinding(aptx, viewport, bindAptxNodes.getAlignmentWithNodes(),
             bindAptxNodes.getNodesWithAlignment());
 
-    ArchaeopteryxInit.bindFrameToJalview(aptx);
+    AptxInit.bindFrameToJalview(aptx);
 
     return aptx;