Changeset 12547 in josm


Ignore:
Timestamp:
2017-07-31T21:41:56+02:00 (3 weeks ago)
Author:
bastiK
Message:

move SearchSettingsActionParameter class to better place

Location:
trunk/src/org/openstreetmap/josm/actions
Files:
2 edited

Legend:

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

    r12546 r12547  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.actions;
    3 
    4 import org.openstreetmap.josm.actions.search.SearchAction.SearchSetting;
    53
    64/**
     
    7674        }
    7775    }
    78 
    79     public static class SearchSettingsActionParameter extends ActionParameter<SearchSetting> {
    80 
    81         public SearchSettingsActionParameter(String name) {
    82             super(name);
    83         }
    84 
    85         @Override
    86         public Class<SearchSetting> getType() {
    87             return SearchSetting.class;
    88         }
    89 
    90         @Override
    91         public SearchSetting readFromString(String s) {
    92             return SearchSetting.readFromString(s);
    93         }
    94 
    95         @Override
    96         public String writeToString(SearchSetting value) {
    97             if (value == null)
    98                 return "";
    99             return value.writeToString();
    100         }
    101     }
    10276}
  • trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java

    r12542 r12547  
    4343import org.openstreetmap.josm.Main;
    4444import org.openstreetmap.josm.actions.ActionParameter;
    45 import org.openstreetmap.josm.actions.ActionParameter.SearchSettingsActionParameter;
    4645import org.openstreetmap.josm.actions.ExpertToggleAction;
    4746import org.openstreetmap.josm.actions.JosmAction;
     
    999998
    1000999    /**
     1000     * {@link ActionParameter} implementation with {@link SearchSetting} as value type.
     1001     * @since 12547 (moved from {@link ActionParameter})
     1002     */
     1003    public static class SearchSettingsActionParameter extends ActionParameter<SearchSetting> {
     1004
     1005        public SearchSettingsActionParameter(String name) {
     1006            super(name);
     1007        }
     1008
     1009        @Override
     1010        public Class<SearchSetting> getType() {
     1011            return SearchSetting.class;
     1012        }
     1013
     1014        @Override
     1015        public SearchSetting readFromString(String s) {
     1016            return SearchSetting.readFromString(s);
     1017        }
     1018
     1019        @Override
     1020        public String writeToString(SearchSetting value) {
     1021            if (value == null)
     1022                return "";
     1023            return value.writeToString();
     1024        }
     1025    }
     1026
     1027    /**
    10011028     * Refreshes the enabled state
    10021029     *
Note: See TracChangeset for help on using the changeset viewer.