JAL-3560 tweak to force use of standard Java HashSet
authorBobHanson <hansonr@stolaf.edu>
Sat, 21 Mar 2020 14:28:01 +0000 (09:28 -0500)
committerBobHanson <hansonr@stolaf.edu>
Sat, 21 Mar 2020 14:28:01 +0000 (09:28 -0500)
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()

src/jalview/datamodel/features/SequenceFeatures.java

index 1e579e0..2101a2f 100644 (file)
@@ -299,7 +299,9 @@ public class SequenceFeatures implements SequenceFeaturesI
   public Set<String> getFeatureGroups(boolean positionalFeatures,
           String... type)
   {
-    Set<String> 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<String> groups = Platform.getJavaOrderedHashSet();
 
     for (FeatureStore featureSet : varargToTypes(type))
     {