Changeset 5196 in josm for trunk/src/org/openstreetmap/josm/gui/tagging/ac
- Timestamp:
- 2012-04-16T22:53:07+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionManager.java
r4869 r5196 149 149 for (final TaggingPreset p : presets) { 150 150 for (TaggingPreset.Item item : p.data) { 151 if (item instanceof TaggingPreset. Check) {152 TaggingPreset. Check ch = (TaggingPreset.Check) item;153 if ( ch.key == null) {151 if (item instanceof TaggingPreset.KeyedItem) { 152 TaggingPreset.KeyedItem ki = (TaggingPreset.KeyedItem) item; 153 if (ki.key == null) { 154 154 continue; 155 155 } 156 presetTagCache.put(ch.key, OsmUtils.falseval); 157 presetTagCache.put(ch.key, OsmUtils.trueval); 158 } else if (item instanceof TaggingPreset.Combo) { 159 TaggingPreset.Combo co = (TaggingPreset.Combo) item; 160 if (co.key == null || co.values == null) { 161 continue; 162 } 163 for (String value : co.values.split(",")) { 164 presetTagCache.put(co.key, value); 165 } 166 } else if (item instanceof TaggingPreset.Key) { 167 TaggingPreset.Key ky = (TaggingPreset.Key) item; 168 if (ky.key == null || ky.value == null) { 169 continue; 170 } 171 presetTagCache.put(ky.key, ky.value); 172 } else if (item instanceof TaggingPreset.Text) { 173 TaggingPreset.Text tt = (TaggingPreset.Text) item; 174 if (tt.key == null) { 175 continue; 176 } 177 presetTagCache.putVoid(tt.key); 178 if (tt.default_ != null && !tt.default_.equals("")) { 179 presetTagCache.put(tt.key, tt.default_); 180 } 156 presetTagCache.putAll(ki.key, ki.getValues()); 181 157 } else if (item instanceof TaggingPreset.Roles) { 182 158 TaggingPreset.Roles r = (TaggingPreset.Roles) item; … … 266 242 * 267 243 * @param list the list to populate 268 * @param key the tag keys244 * @param keys the tag keys 269 245 */ 270 246 public void populateWithTagValues(AutoCompletionList list, List<String> keys) {
Note:
See TracChangeset
for help on using the changeset viewer.