Ignore:
Timestamp:
2017-08-26T00:55:22+02:00 (4 years ago)
Author:
Don-vip
Message:

see #15182 - extract SearchMode and SearchSetting from actions.search.SearchAction to data.osm.search

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/MainApplication.java

    r12647 r12659  
    7373import org.openstreetmap.josm.data.osm.DataSet;
    7474import org.openstreetmap.josm.data.osm.OsmPrimitive;
     75import org.openstreetmap.josm.data.osm.search.SearchMode;
    7576import org.openstreetmap.josm.data.validation.OsmValidator;
    7677import org.openstreetmap.josm.gui.ProgramArguments.Option;
     
    10241025            tasks.add(MainApplication.worker.submit(() -> {
    10251026                for (String s : selectionArguments) {
    1026                     SearchAction.search(s, SearchAction.SearchMode.add);
     1027                    SearchAction.search(s, SearchMode.add);
    10271028                }
    10281029            }));
  • trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java

    r12636 r12659  
    4444import org.openstreetmap.josm.actions.relation.EditRelationAction;
    4545import org.openstreetmap.josm.actions.relation.SelectInRelationListAction;
    46 import org.openstreetmap.josm.actions.search.SearchAction.SearchSetting;
    4746import org.openstreetmap.josm.data.SelectionChangedListener;
    4847import org.openstreetmap.josm.data.coor.LatLon;
     
    5857import org.openstreetmap.josm.data.osm.event.DatasetEventManager;
    5958import org.openstreetmap.josm.data.osm.event.DatasetEventManager.FireMode;
     59import org.openstreetmap.josm.data.osm.search.SearchSetting;
    6060import org.openstreetmap.josm.data.osm.event.NodeMovedEvent;
    6161import org.openstreetmap.josm.data.osm.event.PrimitivesAddedEvent;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java

    r12656 r12659  
    6060import org.openstreetmap.josm.actions.relation.SelectMembersAction;
    6161import org.openstreetmap.josm.actions.relation.SelectRelationAction;
    62 import org.openstreetmap.josm.actions.search.SearchAction.SearchSetting;
    6362import org.openstreetmap.josm.command.ChangeCommand;
    6463import org.openstreetmap.josm.command.ChangePropertyCommand;
     
    7877import org.openstreetmap.josm.data.osm.event.DatasetEventManager.FireMode;
    7978import org.openstreetmap.josm.data.osm.search.SearchCompiler;
     79import org.openstreetmap.josm.data.osm.search.SearchSetting;
    8080import org.openstreetmap.josm.data.osm.event.SelectionEventManager;
    8181import org.openstreetmap.josm.data.preferences.StringProperty;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/RecentTagCollection.java

    r12656 r12659  
    88import java.util.Map;
    99
    10 import org.openstreetmap.josm.actions.search.SearchAction;
    1110import org.openstreetmap.josm.data.osm.Tag;
    1211import org.openstreetmap.josm.data.osm.search.SearchParseError;
     12import org.openstreetmap.josm.data.osm.search.SearchSetting;
    1313import org.openstreetmap.josm.data.osm.search.SearchCompiler;
    1414import org.openstreetmap.josm.data.preferences.CollectionProperty;
     
    8282    }
    8383
    84     public void setTagsToIgnore(SearchAction.SearchSetting tagsToIgnore) throws SearchParseError {
     84    public void setTagsToIgnore(SearchSetting tagsToIgnore) throws SearchParseError {
    8585        setTagsToIgnore(tagsToIgnore.text.isEmpty() ? SearchCompiler.Never.INSTANCE : SearchCompiler.compile(tagsToIgnore));
    8686    }
    8787
    88     public SearchAction.SearchSetting ignoreTag(Tag tagToIgnore, SearchAction.SearchSetting settingToUpdate) throws SearchParseError {
     88    public SearchSetting ignoreTag(Tag tagToIgnore, SearchSetting settingToUpdate) throws SearchParseError {
    8989        final String forTag = SearchCompiler.buildSearchStringForTag(tagToIgnore.getKey(), tagToIgnore.getValue());
    9090        settingToUpdate.text = settingToUpdate.text.isEmpty()
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java

    r12656 r12659  
    7070import org.openstreetmap.josm.data.osm.Tag;
    7171import org.openstreetmap.josm.data.osm.search.SearchParseError;
     72import org.openstreetmap.josm.data.osm.search.SearchSetting;
    7273import org.openstreetmap.josm.data.osm.search.SearchCompiler;
    7374import org.openstreetmap.josm.data.preferences.BooleanProperty;
     
    130131            Collections.<String>emptyList());
    131132    public static final StringProperty PROPERTY_TAGS_TO_IGNORE = new StringProperty("properties.recent-tags.ignore",
    132             new SearchAction.SearchSetting().writeToString());
     133            new SearchSetting().writeToString());
    133134
    134135    /**
     
    163164
    164165    final RecentTagCollection recentTags = new RecentTagCollection(MAX_LRU_TAGS_NUMBER);
    165     SearchAction.SearchSetting tagsToIgnore;
     166    SearchSetting tagsToIgnore;
    166167
    167168    /**
     
    330331
    331332    void loadTagsToIgnore() {
    332         final SearchAction.SearchSetting searchSetting = Utils.firstNonNull(
    333                 SearchAction.SearchSetting.readFromString(PROPERTY_TAGS_TO_IGNORE.get()), new SearchAction.SearchSetting());
     333        final SearchSetting searchSetting = Utils.firstNonNull(
     334                SearchSetting.readFromString(PROPERTY_TAGS_TO_IGNORE.get()), new SearchSetting());
    334335        if (!Objects.equals(tagsToIgnore, searchSetting)) {
    335336            try {
     
    338339            } catch (SearchParseError parseError) {
    339340                warnAboutParseError(parseError);
    340                 tagsToIgnore = new SearchAction.SearchSetting();
     341                tagsToIgnore = new SearchSetting();
    341342                recentTags.setTagsToIgnore(SearchCompiler.Never.INSTANCE);
    342343            }
     
    10241025            @Override
    10251026            public void actionPerformed(ActionEvent e) {
    1026                 final SearchAction.SearchSetting newTagsToIngore = SearchAction.showSearchDialog(tagsToIgnore);
     1027                final SearchSetting newTagsToIngore = SearchAction.showSearchDialog(tagsToIgnore);
    10271028                if (newTagsToIngore == null) {
    10281029                    return;
  • trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/Roles.java

    r12656 r12659  
    1313import javax.swing.JPanel;
    1414
    15 import org.openstreetmap.josm.actions.search.SearchAction;
    1615import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1716import org.openstreetmap.josm.data.osm.Tag;
    1817import org.openstreetmap.josm.data.osm.search.SearchParseError;
     18import org.openstreetmap.josm.data.osm.search.SearchSetting;
    1919import org.openstreetmap.josm.data.osm.search.SearchCompiler;
    2020import org.openstreetmap.josm.gui.tagging.presets.TaggingPresetItem;
     
    7878        public void setMember_expression(String memberExpression) throws SAXException {
    7979            try {
    80                 final SearchAction.SearchSetting searchSetting = new SearchAction.SearchSetting();
     80                final SearchSetting searchSetting = new SearchSetting();
    8181                searchSetting.text = memberExpression;
    8282                searchSetting.caseSensitive = true;
Note: See TracChangeset for help on using the changeset viewer.