- Timestamp:
- 2014-05-13T13:39:24+02:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/tagging
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItem.java
r6795 r7118 2 2 package org.openstreetmap.josm.gui.tagging; 3 3 4 import java.util.Arrays; 4 5 import java.util.Collection; 5 6 import java.util.List; … … 21 22 public abstract class TaggingPresetItem { 22 23 23 protected void initAutoCompletionField(AutoCompletingTextField field, String key) { 24 protected void initAutoCompletionField(AutoCompletingTextField field, String... key) { 25 initAutoCompletionField(field, Arrays.asList(key)); 26 } 27 28 protected void initAutoCompletionField(AutoCompletingTextField field, List<String> keys) { 24 29 if (Main.main == null) return; 25 30 OsmDataLayer layer = Main.main.getEditLayer(); … … 28 33 } 29 34 AutoCompletionList list = new AutoCompletionList(); 30 layer.data.getAutoCompletionManager().populateWithTagValues(list, key );35 layer.data.getAutoCompletionManager().populateWithTagValues(list, keys); 31 36 field.setAutoCompletionList(list); 32 37 } -
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java
r7100 r7118 577 577 public String auto_increment; 578 578 public String length; 579 public String alternative_autocomplete_keys; 579 580 580 581 private JComponent value; … … 585 586 Usage usage = determineTextUsage(sel, key); 586 587 AutoCompletingTextField textField = new AutoCompletingTextField(); 587 initAutoCompletionField(textField, key); 588 if (alternative_autocomplete_keys != null) { 589 initAutoCompletionField(textField, (key + "," + alternative_autocomplete_keys).split(",")); 590 } else { 591 initAutoCompletionField(textField, key); 592 } 588 593 if (length != null && !length.isEmpty()) { 589 594 textField.setMaxChars(Integer.valueOf(length));
Note:
See TracChangeset
for help on using the changeset viewer.