Changeset 15926 in josm for trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetSelector.java
- Timestamp:
- 2020-02-24T22:04:33+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetSelector.java
r15909 r15926 95 95 PresetClassification(TaggingPreset preset) { 96 96 this.preset = preset; 97 Set<String> group s= new HashSet<>();98 Set<String> name s= new HashSet<>();99 Set<String> tag s= new HashSet<>();97 Set<String> groupSet = new HashSet<>(); 98 Set<String> nameSet = new HashSet<>(); 99 Set<String> tagSet = new HashSet<>(); 100 100 TaggingPreset group = preset.group; 101 101 while (group != null) { 102 addLocaleNames(group s, group);102 addLocaleNames(groupSet, group); 103 103 group = group.group; 104 104 } 105 addLocaleNames(name s, preset);105 addLocaleNames(nameSet, preset); 106 106 for (TaggingPresetItem item: preset.data) { 107 107 if (item instanceof KeyedItem) { 108 tag s.add(((KeyedItem) item).key);108 tagSet.add(((KeyedItem) item).key); 109 109 if (item instanceof ComboMultiSelect) { 110 110 final ComboMultiSelect cms = (ComboMultiSelect) item; 111 111 if (Boolean.parseBoolean(cms.values_searchable)) { 112 tag s.addAll(cms.getDisplayValues());112 tagSet.addAll(cms.getDisplayValues()); 113 113 } 114 114 } 115 115 if (item instanceof Key && ((Key) item).value != null) { 116 tag s.add(((Key) item).value);116 tagSet.add(((Key) item).value); 117 117 } 118 118 } else if (item instanceof Roles) { 119 119 for (Role role : ((Roles) item).roles) { 120 tag s.add(role.key);121 } 122 } 123 } 124 this.groups = Utils.toUnmodifiableList(group s);125 this.names = Utils.toUnmodifiableList(name s);126 this.tags = Utils.toUnmodifiableList(tag s);120 tagSet.add(role.key); 121 } 122 } 123 } 124 this.groups = Utils.toUnmodifiableList(groupSet); 125 this.names = Utils.toUnmodifiableList(nameSet); 126 this.tags = Utils.toUnmodifiableList(tagSet); 127 127 } 128 128
Note:
See TracChangeset
for help on using the changeset viewer.