- Timestamp:
- 2021-11-03T01:01:03+01:00 (3 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/vector/DataStore.java
r18193 r18305 67 67 /** 68 68 * Get the primitives map. 69 * @implNoteThe returned map is a {@link Collections#synchronizedMap}. Please synchronize on it.69 * The returned map is a {@link Collections#synchronizedMap}. Please synchronize on it. 70 70 * @return The Primitives map. 71 71 */ … … 90 90 * @param primitive The primitive to remove 91 91 */ 92 @SuppressWarnings("squid:S2445")93 92 protected void removePrimitive(O primitive) { 94 93 if (primitive == null) { -
trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompComboBox.java
r18221 r18305 3 3 4 4 import java.awt.im.InputContext; 5 import java.util.Collection;6 import java.util.Collections;7 import java.util.LinkedList;8 5 import java.util.Locale; 9 6 … … 99 96 100 97 /** 101 * Sets the items of the combobox to the given {@code String}s in reversed order (last element102 * first).103 *104 * @param elems The string items to set105 * @deprecated Has been moved to the model, where it belongs. Use106 * {@link org.openstreetmap.josm.gui.widgets.HistoryComboBoxModel#addAllStrings} instead. Probably you want to use107 * {@link org.openstreetmap.josm.gui.tagging.ac.AutoCompComboBoxModel.Preferences#load} and108 * {@link org.openstreetmap.josm.gui.tagging.ac.AutoCompComboBoxModel.Preferences#save}.109 */110 @Deprecated111 public void setPossibleItems(Collection<E> elems) {112 // We have to reverse the history, because ComboBoxHistory will reverse it again in addElement()113 LinkedList<E> reversed = new LinkedList<>(elems);114 Collections.reverse(reversed);115 setPossibleAcItems(reversed);116 }117 118 /**119 * Sets the items of the combobox to the given {@code String}s in top down order.120 *121 * @param elems The strings to set.122 * @since 15011123 * @deprecated Has been moved to the model, where it belongs. Use124 * {@link org.openstreetmap.josm.gui.widgets.HistoryComboBoxModel#addAllStrings} instead. Probably you want to use125 * {@link org.openstreetmap.josm.gui.tagging.ac.AutoCompComboBoxModel.Preferences#load} and126 * {@link org.openstreetmap.josm.gui.tagging.ac.AutoCompComboBoxModel.Preferences#save}.127 */128 @Deprecated129 public void setPossibleItemsTopDown(Collection<E> elems) {130 setPossibleAcItems(elems);131 }132 133 /**134 * Sets the items of the combobox to the given {@code AutoCompletionItem}s.135 *136 * @param elems AutoCompletionItem items137 * @since 12859138 * @deprecated Use {@link AutoCompComboBoxModel#addAllElements} instead.139 */140 @Deprecated141 public void setPossibleAcItems(Collection<E> elems) {142 Object oldValue = getEditor().getItem();143 getModel().removeAllElements();144 getModel().addAllElements(elems);145 getEditor().setItem(oldValue);146 }147 148 /**149 98 * Enables or disables the autocompletion. 150 99 * -
trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionManager.java
r18221 r18305 290 290 public void populateWithMemberRoles(AutoCompletionList list, Relation r) { 291 291 CheckParameterUtil.ensureParameterNotNull(list, "list"); 292 Collection<TaggingPreset> presets = r != null ? TaggingPresets.getMatchingPresets(null, r.getKeys(), false) : null;292 Collection<TaggingPreset> presets = r != null ? TaggingPresets.getMatchingPresets(null, r.getKeys(), false) : Collections.emptyList(); 293 293 if (r != null && !Utils.isEmpty(presets)) { 294 294 for (TaggingPreset tp : presets) { -
trunk/src/org/openstreetmap/josm/gui/widgets/HistoryComboBox.java
r18193 r18305 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.gui.widgets; 3 4 import java.util.List;5 3 6 4 import org.openstreetmap.josm.gui.tagging.ac.AutoCompComboBox; … … 34 32 getModel().setSelectedItem(newItem); 35 33 } 36 37 /**38 * Returns the items as strings39 * @return the items as strings40 * @deprecated Has been moved to the model, where it belongs. Use41 * {@link HistoryComboBoxModel#asStringList} instead. Probably you want to use42 * {@link org.openstreetmap.josm.gui.tagging.ac.AutoCompComboBoxModel.Preferences#load} and43 * {@link org.openstreetmap.josm.gui.tagging.ac.AutoCompComboBoxModel.Preferences#save}.44 */45 @Deprecated46 public List<String> getHistory() {47 return getModel().asStringList();48 }49 34 }
Note:
See TracChangeset
for help on using the changeset viewer.