From 052516c9711a49bc5cafbc1145f696febc4ccc74 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Mon, 11 Jul 2022 16:25:17 +0100 Subject: [PATCH] JAL-4034 allow a jalview_property to set the threshold level --- src/jalview/gui/StructureChooser.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/jalview/gui/StructureChooser.java b/src/jalview/gui/StructureChooser.java index b32e435..3f5f39c 100644 --- a/src/jalview/gui/StructureChooser.java +++ b/src/jalview/gui/StructureChooser.java @@ -43,6 +43,7 @@ import javax.swing.table.AbstractTableModel; import jalview.api.structures.JalviewStructureDisplayI; import jalview.bin.Cache; +import jalview.bin.Console; import jalview.bin.Jalview; import jalview.datamodel.PDBEntry; import jalview.datamodel.SequenceI; @@ -353,8 +354,10 @@ public class StructureChooser extends GStructureChooser } }; }; - if (ignoreGui || seqsWithoutSourceDBRef - .size() < THRESHOLD_WARN_UNIPROT_FETCH_NEEDED) + int threshold = Cache.getDefault("THRESHOLD_WARN_UNIPROT_FETCH", + THRESHOLD_WARN_UNIPROT_FETCH_NEEDED); + Console.debug("Using Uniprot fetch threshold of " + threshold); + if (ignoreGui || seqsWithoutSourceDBRef.size() < threshold) { Executors.defaultThreadFactory().newThread(discoverCanonicalDBrefs) .start(); -- 1.7.10.2