From: Ben Soares Date: Mon, 11 Jul 2022 15:25:17 +0000 (+0100) Subject: JAL-4034 allow a jalview_property to set the threshold level X-Git-Tag: Release_2_11_2_6~35^2~7 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=052516c9711a49bc5cafbc1145f696febc4ccc74;p=jalview.git JAL-4034 allow a jalview_property to set the threshold level --- 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();