Changeset 2088 in josm for trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionCache.java
- Timestamp:
- 09.09.2009 19:38:48 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionCache.java
r2048 r2088 3 3 import java.util.ArrayList; 4 4 import java.util.Collection; 5 import java.util.Collections;6 5 import java.util.HashMap; 7 6 import java.util.HashSet; 8 import java.util.LinkedList;9 7 import java.util.List; 10 8 import java.util.Set; … … 74 72 /** the cached list of member roles */ 75 73 private Set<String> roleCache; 76 /** the cache of all tag values */77 private Set<String> allTagValues;78 74 /** the layer this cache is built for */ 79 75 private OsmDataLayer layer; … … 86 82 tagCache = new HashMap<String, Set<String>>(); 87 83 roleCache = new HashSet<String>(); 88 allTagValues = new HashSet<String>();89 84 this.layer = layer; 90 85 } … … 114 109 cacheKey(key); 115 110 tagCache.get(key).add(value); 116 allTagValues.add(value);117 111 } 118 112 … … 236 230 list.add(tagCache.keySet(), AutoCompletionItemPritority.IS_IN_DATASET); 237 231 } 238 239 240 /**241 * Populates the an {@see AutoCompletionList} with the currently cached242 * tag values243 *244 * @param list the list to populate245 * @param append true to add the keys to the list; false, to replace the keys246 * in the list by the keys in the cache247 */248 public void populateWithValues(AutoCompletionList list, boolean append) {249 if (!append) {250 list.clear();251 }252 list.add(this.allTagValues, AutoCompletionItemPritority.IS_IN_DATASET);253 }254 232 }
Note: See TracChangeset
for help on using the changeset viewer.
