Changeset 18173 in josm for trunk/src/org/openstreetmap/josm/data/osm/search/SearchSetting.java
- Timestamp:
- 2021-08-24T02:43:50+02:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/search/SearchSetting.java
r13887 r18173 7 7 8 8 import org.openstreetmap.josm.tools.Logging; 9 import org.openstreetmap.josm.tools.Utils; 9 10 10 11 /** … … 50 51 @Override 51 52 public String toString() { 53 return Utils.shortenString(text, 54 org.openstreetmap.josm.actions.search.SearchAction.MAX_LENGTH_SEARCH_EXPRESSION_DISPLAY); 55 } 56 57 /** 58 * A more talkative version of toString. 59 * @return a bit more info than toString 60 * @since 18173 61 */ 62 public String toStringEx() { 52 63 String cs = caseSensitive ? 53 64 /*case sensitive*/ trc("search", "CS") : … … 140 151 141 152 /** 153 * Build a SearchSetting from a plain unformatted string. 154 * <p> 155 * All attributes are defaulted, only the search string is set. This function is used in 156 * {@link org.openstreetmap.josm.gui.download.OverpassQueryWizardDialog}. 157 * 158 * @param s The string 159 * @return The instance 160 * @since 18173 161 */ 162 public static SearchSetting fromString(String s) { 163 if (s.isEmpty()) 164 return null; 165 SearchSetting result = new SearchSetting(); 166 result.text = s; 167 return result; 168 } 169 170 /** 142 171 * Builds a string representation of the {@code SearchSetting} object, 143 172 * see {@link #readFromString(String)} for more details.
Note:
See TracChangeset
for help on using the changeset viewer.