From: BobHanson Date: Sat, 21 Mar 2020 14:28:01 +0000 (-0500) Subject: JAL-3560 tweak to force use of standard Java HashSet X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=52f0d2f2cb4a9a2835a5ac21db20270ab1f454e7;p=jalview.git JAL-3560 tweak to force use of standard Java HashSet adds Platform.getOrderedHashSet() adds Platform.setJavaScriptMapObjectEnabled(boolean enabled) sets the results from SequenceFeatures.getFeatureGroups(...) (for FeatureSettings) and SequenceFeatures.getFeatureTypesForGroups(...) (for SeqCanvas and OverviewCanvas painting) to be a standard Java HashSet, not using the JavaScript Map object. Sets the Platform.getJavaOrderedHashSet() --- diff --git a/src/jalview/datamodel/features/SequenceFeatures.java b/src/jalview/datamodel/features/SequenceFeatures.java index 1e579e0..2101a2f 100644 --- a/src/jalview/datamodel/features/SequenceFeatures.java +++ b/src/jalview/datamodel/features/SequenceFeatures.java @@ -299,7 +299,9 @@ public class SequenceFeatures implements SequenceFeaturesI public Set getFeatureGroups(boolean positionalFeatures, String... type) { - Set groups = new HashSet<>(); + // BH 2020.03.21 This is the set that orders the list of groups + // at the top of the FeatureSettings panel. + Set groups = Platform.getJavaOrderedHashSet(); for (FeatureStore featureSet : varargToTypes(type)) {