Changeset 12619 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2017-08-22T19:41:55+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java
r12549 r12619 108 108 private String objKey; 109 109 110 private final Comparator<AutoCompletionListItem> defaultACItemComparator=110 static final Comparator<AutoCompletionListItem> DEFAULT_AC_ITEM_COMPARATOR = 111 111 (o1, o2) -> String.CASE_INSENSITIVE_ORDER.compare(o1.getValue(), o2.getValue()); 112 112 … … 204 204 */ 205 205 @SuppressWarnings("unchecked") 206 privateboolean containsDataKey(String key) {206 boolean containsDataKey(String key) { 207 207 return IntStream.range(0, tagData.getRowCount()) 208 208 .anyMatch(i -> key.equals(tagData.getValueAt(i, 0)) /* sic! do not use getDataKey*/ … … 444 444 AutoCompletionManager autocomplete = Main.getLayerManager().getEditLayer().data.getAutoCompletionManager(); 445 445 List<AutoCompletionListItem> keyList = autocomplete.getKeys(); 446 keyList.sort( defaultACItemComparator);446 keyList.sort(DEFAULT_AC_ITEM_COMPARATOR); 447 447 448 448 keys = new AutoCompletingComboBox(key); … … 696 696 keyList.removeIf(item -> containsDataKey(item.getValue())); 697 697 698 keyList.sort( defaultACItemComparator);698 keyList.sort(DEFAULT_AC_ITEM_COMPARATOR); 699 699 keys.setPossibleACItems(keyList); 700 700 keys.setEditable(true); … … 715 715 }); 716 716 717 focus = addFocusAdapter(autocomplete, defaultACItemComparator);717 focus = addFocusAdapter(autocomplete, DEFAULT_AC_ITEM_COMPARATOR); 718 718 // fire focus event in advance or otherwise the popup list will be too small at first 719 719 focus.focusGained(null);
Note:
See TracChangeset
for help on using the changeset viewer.