- Timestamp:
- 2017-06-08T00:01:06+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java
r12333 r12334 29 29 import java.util.function.Predicate; 30 30 31 import javax.swing.BorderFactory; 32 import javax.swing.ButtonGroup; 31 33 import javax.swing.JCheckBox; 32 34 import javax.swing.JLabel; … … 36 38 import javax.swing.text.BadLocationException; 37 39 import javax.swing.text.JTextComponent; 38 import javax.swing.BorderFactory;39 import javax.swing.ButtonGroup;40 40 41 41 import org.openstreetmap.josm.Main; … … 61 61 import org.openstreetmap.josm.tools.Utils; 62 62 63 /** 64 * The search action allows the user to search the data layer using a complex search string. 65 * 66 * @see SearchCompiler 67 */ 63 68 public class SearchAction extends JosmAction implements ParameterizedAction { 64 69 70 /** 71 * The default size of the search history 72 */ 65 73 public static final int DEFAULT_SEARCH_HISTORY_SIZE = 15; 66 /** Maximum number of characters before the search expression is shortened for display purposes. */ 74 /** 75 * Maximum number of characters before the search expression is shortened for display purposes. 76 */ 67 77 public static final int MAX_LENGTH_SEARCH_EXPRESSION_DISPLAY = 100; 68 78 … … 120 130 } 121 131 132 /** 133 * Gets the search history 134 * @return The last searched terms. Do not modify it. 135 */ 122 136 public static Collection<SearchSetting> getSearchHistory() { 123 137 return searchHistory; 124 138 } 125 139 140 /** 141 * Saves a search to the search history. 142 * @param s The search to save 143 */ 126 144 public static void saveToHistory(SearchSetting s) { 127 145 if (searchHistory.isEmpty() || !s.equals(searchHistory.getFirst())) { … … 143 161 } 144 162 163 /** 164 * Gets a list of all texts that were recently used in the search 165 * @return The list of search texts. 166 */ 145 167 public static List<String> getSearchExpressionHistory() { 146 168 List<String> ret = new ArrayList<>(getSearchHistory().size());
Note:
See TracChangeset
for help on using the changeset viewer.