Changeset 12334 in josm for trunk


Ignore:
Timestamp:
2017-06-08T00:01:06+02:00 (7 years ago)
Author:
michael2402
Message:

Javadoc for SearchAction.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java

    r12333 r12334  
    2929import java.util.function.Predicate;
    3030
     31import javax.swing.BorderFactory;
     32import javax.swing.ButtonGroup;
    3133import javax.swing.JCheckBox;
    3234import javax.swing.JLabel;
     
    3638import javax.swing.text.BadLocationException;
    3739import javax.swing.text.JTextComponent;
    38 import javax.swing.BorderFactory;
    39 import javax.swing.ButtonGroup;
    4040
    4141import org.openstreetmap.josm.Main;
     
    6161import org.openstreetmap.josm.tools.Utils;
    6262
     63/**
     64 * The search action allows the user to search the data layer using a complex search string.
     65 *
     66 * @see SearchCompiler
     67 */
    6368public class SearchAction extends JosmAction implements ParameterizedAction {
    6469
     70    /**
     71     * The default size of the search history
     72     */
    6573    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     */
    6777    public static final int MAX_LENGTH_SEARCH_EXPRESSION_DISPLAY = 100;
    6878
     
    120130    }
    121131
     132    /**
     133     * Gets the search history
     134     * @return The last searched terms. Do not modify it.
     135     */
    122136    public static Collection<SearchSetting> getSearchHistory() {
    123137        return searchHistory;
    124138    }
    125139
     140    /**
     141     * Saves a search to the search history.
     142     * @param s The search to save
     143     */
    126144    public static void saveToHistory(SearchSetting s) {
    127145        if (searchHistory.isEmpty() || !s.equals(searchHistory.getFirst())) {
     
    143161    }
    144162
     163    /**
     164     * Gets a list of all texts that were recently used in the search
     165     * @return The list of search texts.
     166     */
    145167    public static List<String> getSearchExpressionHistory() {
    146168        List<String> ret = new ArrayList<>(getSearchHistory().size());
Note: See TracChangeset for help on using the changeset viewer.