Changeset 2048 in josm for trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionList.java
- Timestamp:
- 2009-09-04T10:49:53+02:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/tagging/ac
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionList.java
r1762 r2048 1 package org.openstreetmap.josm.gui. dialogs.relation.ac;1 package org.openstreetmap.josm.gui.tagging.ac; 2 2 3 3 import java.util.ArrayList; 4 import java.util.Collection; 4 5 import java.util.Collections; 5 6 import java.util.List; … … 125 126 } 126 127 128 /** 129 * adds a list of strings to this list. Only strings which 130 * are not null and which do not exist yet in the list are added. 131 * 132 * @param value a list of strings to add 133 * @param priority the priority to use 134 */ 135 public void add(Collection<String> values, AutoCompletionItemPritority priority) { 136 if (values == null) return; 137 for (String value: values) { 138 if (value == null) { 139 continue; 140 } 141 AutoCompletionListItem item = new AutoCompletionListItem(value,priority); 142 appendOrUpdatePriority(item); 143 144 } 145 sort(); 146 filter(); 147 } 148 127 149 protected void appendOrUpdatePriority(AutoCompletionListItem toadd) { 128 150 AutoCompletionListItem item = lookup(toadd.getValue());
Note:
See TracChangeset
for help on using the changeset viewer.