From: gmungoc Date: Tue, 2 May 2017 09:42:13 +0000 (+0100) Subject: JAL-2499 inlined two 1-line methods X-Git-Tag: Release_2_10_2~3^2~105^2~2^2~10 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=a5ab6cce3a64d41c3f91ba49f5e4d9536a2b0018;p=jalview.git JAL-2499 inlined two 1-line methods --- diff --git a/src/jalview/appletgui/TreePanel.java b/src/jalview/appletgui/TreePanel.java index 70a3c04..8b1f79c 100644 --- a/src/jalview/appletgui/TreePanel.java +++ b/src/jalview/appletgui/TreePanel.java @@ -190,7 +190,9 @@ public class TreePanel extends EmbmenuFrame implements ActionListener, } else { - ScoreModelI sm = configureScoreModel(pwtype); + ScoreModelI sm1 = ScoreModels.getInstance().getScoreModel(pwtype, + treeCanvas.ap); + ScoreModelI sm = sm1; TreeBuilder njtree = type.equals(TreeBuilder.NEIGHBOUR_JOINING) ? new NJTree( av, sm, SimilarityParams.Jalview) : new AverageDistanceTree(av, sm, SimilarityParams.Jalview); @@ -362,18 +364,4 @@ public class TreePanel extends EmbmenuFrame implements ActionListener, inputData.addActionListener(this); } - /** - * Gets an instantiated score model for the given name, configured for the - * current view if applicable - * - * @param modelName - * @return - */ - protected ScoreModelI configureScoreModel(String modelName) - { - ScoreModelI sm = ScoreModels.getInstance().getScoreModel(modelName, - treeCanvas.ap); - return sm; - } - } diff --git a/src/jalview/gui/TreePanel.java b/src/jalview/gui/TreePanel.java index f2f0bf7..9dd805e 100755 --- a/src/jalview/gui/TreePanel.java +++ b/src/jalview/gui/TreePanel.java @@ -275,7 +275,8 @@ public class TreePanel extends GTreePanel } else { - ScoreModelI sm = configureScoreModel(); + ScoreModelI sm = ScoreModels.getInstance().getScoreModel( + scoreModelName, treeCanvas.ap); TreeBuilder njtree = treeType.equals(TreeBuilder.NEIGHBOUR_JOINING) ? new NJTree( av, sm, similarityParams) : new AverageDistanceTree(av, sm, similarityParams); @@ -850,16 +851,4 @@ public class TreePanel extends GTreePanel treecalcnm, smn); return ttl; } - - /** - * Instantiate an instance of the score model, configured for the current view - * if applicable - * - * @return - */ - protected ScoreModelI configureScoreModel() - { - return ScoreModels.getInstance().getScoreModel(scoreModelName, - treeCanvas.ap); - } }