From acc6f01e79fb19336964ea21a81a0cc6df186b81 Mon Sep 17 00:00:00 2001 From: kjvdheide Date: Thu, 26 Oct 2017 21:37:40 +0100 Subject: [PATCH] Made FreeUpMemoryTest compatible with modified CalculationChooser --- src/jalview/gui/CalculationChooser.java | 22 +++++++++++++--------- test/jalview/gui/FreeUpMemoryTest.java | 3 +-- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/jalview/gui/CalculationChooser.java b/src/jalview/gui/CalculationChooser.java index ebb12b9..11ee1a0 100644 --- a/src/jalview/gui/CalculationChooser.java +++ b/src/jalview/gui/CalculationChooser.java @@ -477,17 +477,9 @@ public class CalculationChooser extends JPanel } else { + createTree(substitutionMatrix, params); - String treeAlgo = determineTreeAlgo(); - TreeCalculator treeCalculator = new TreeCalculator(treeAlgo, - substitutionMatrix, params); - TreeBuilder calculatedTree = treeCalculator - .makeTree(af.getViewport()); - ArchaeopteryxInit.createInstance(calculatedTree); - - TreeModel tree = new TreeModel(calculatedTree); - openTreePanel(tree, treeAlgo, substitutionMatrix); @@ -497,7 +489,19 @@ public class CalculationChooser extends JPanel // closeFrame(); } + protected void createTree(String substitutionMatrix, + SimilarityParamsI params) + { + String treeAlgo = determineTreeAlgo(); + TreeCalculator treeCalculator = new TreeCalculator(treeAlgo, + substitutionMatrix, params); + TreeBuilder calculatedTree = treeCalculator.makeTree(af.getViewport()); + + ArchaeopteryxInit.createInstance(calculatedTree); + TreeModel tree = new TreeModel(calculatedTree); + openTreePanel(tree, treeAlgo, substitutionMatrix); + } protected String determineTreeAlgo() // to be modified & expanded diff --git a/test/jalview/gui/FreeUpMemoryTest.java b/test/jalview/gui/FreeUpMemoryTest.java index 3f8e792..1534f3e 100644 --- a/test/jalview/gui/FreeUpMemoryTest.java +++ b/test/jalview/gui/FreeUpMemoryTest.java @@ -161,8 +161,7 @@ public class FreeUpMemoryTest af.openTreePcaDialog(); CalculationChooser dialog = af.alignPanel.getCalculationDialog(); dialog.openPcaPanel("BLOSUM62", dialog.getSimilarityParameters(true)); - // dialog.openTreePanel("BLOSUM62", dialog.getSimilarityParameters(false)); - // to be adapted + dialog.createTree("BLOSUM62",dialog.getSimilarityParameters(false)); /* * wait until Tree and PCA have been computed -- 1.7.10.2