- Timestamp:
- 2019-08-08T01:24:18+02:00 (5 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/MapRectifierWMSmenuAction.java
r14743 r15293 204 204 if (m.find()) { 205 205 String id = m.group(1); 206 String newURL = s.wmsUrl.replace All("__s__", id);206 String newURL = s.wmsUrl.replace("__s__", id); 207 207 String title = s.name + " (" + id + ')'; 208 208 addWMSLayer(title, newURL); … … 211 211 // If not, look if it's a valid ID for the selected service 212 212 if (s.idValidator.matcher(text).matches()) { 213 String newURL = s.wmsUrl.replace All("__s__", text);213 String newURL = s.wmsUrl.replace("__s__", text); 214 214 String title = s.name + " (" + text + ')'; 215 215 addWMSLayer(title, newURL); -
trunk/src/org/openstreetmap/josm/data/validation/tests/ConditionalKeys.java
r15071 r15293 106 106 return false; 107 107 } 108 final String[] parts = key.replace All(":conditional", "").split(":");108 final String[] parts = key.replace(":conditional", "").split(":"); 109 109 return isKeyValid3Parts(parts) || isKeyValid1Part(parts) || isKeyValid2Parts(parts); 110 110 } -
trunk/src/org/openstreetmap/josm/gui/autofilter/AutoFilterRule.java
r13849 r15293 97 97 new AutoFilterRule("layer", 16), 98 98 new AutoFilterRule("maxspeed", 16) 99 .setValueFormatter(s -> s.replace All(" mph", "")),99 .setValueFormatter(s -> s.replace(" mph", "")), 100 100 new AutoFilterRule("voltage", 5) 101 101 .setValueFormatter(s -> s.replaceAll("000$", "k") + 'V') -
trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java
r15289 r15293 706 706 // Add settings not in groups 707 707 final List<StyleSetting> allStylesInGroups = style.settingGroups.values().stream() 708 .flatMap( l -> l.stream()).collect(Collectors.toList());708 .flatMap(List<StyleSetting>::stream).collect(Collectors.toList()); 709 709 for (StyleSetting s : style.settings.stream() 710 710 .filter(s -> !allStylesInGroups.contains(s)).collect(Collectors.toList())) { -
trunk/src/org/openstreetmap/josm/gui/mappaint/BooleanStyleSettingGui.java
r15292 r15293 48 48 } 49 49 50 publicvoid doClickWithoutRepaint(int pressTime) {50 void doClickWithoutRepaint(int pressTime) { 51 51 noRepaint = true; 52 52 doClick(pressTime); -
trunk/src/org/openstreetmap/josm/gui/mappaint/StyleSetting.java
r15289 r15293 54 54 55 55 @Override 56 public int hashCode() { 57 return Objects.hash(label, parentStyle); 58 } 59 60 @Override 61 public boolean equals(Object obj) { 62 if (this == obj) 63 return true; 64 if (obj == null || getClass() != obj.getClass()) 65 return false; 66 LabeledStyleSetting other = (LabeledStyleSetting) obj; 67 return Objects.equals(label, other.label) && Objects.equals(parentStyle, other.parentStyle); 68 } 69 70 @Override 56 71 public int compareTo(LabeledStyleSetting o) { 57 72 return label.compareTo(o.label); … … 64 79 */ 65 80 class StyleSettingGroup extends LabeledStyleSetting { 81 /** group identifier */ 66 82 public final String key; 83 /** group icon (optional) */ 67 84 public final Icon icon; 68 85 … … 73 90 } 74 91 92 /** 93 * Creates a new {@code StyleSettingGroup}. 94 * @param c cascade 95 * @param parentStyle parent style source 96 * @param key group identifier 97 * @return newly created {@code StyleSettingGroup} 98 */ 75 99 public static StyleSettingGroup create(Cascade c, StyleSource parentStyle, String key) { 76 100 String label = c.get("label", null, String.class); … … 98 122 } 99 123 124 /** 125 * Creates a new {@code BooleanStyleSetting}. 126 * @param c cascade 127 * @param parentStyle parent style source 128 * @param key setting identifier 129 * @return newly created {@code BooleanStyleSetting} 130 */ 100 131 public static BooleanStyleSetting create(Cascade c, StyleSource parentStyle, String key) { 101 132 String label = c.get("label", null, String.class); -
trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetItem.java
r14143 r15293 102 102 103 103 protected static String fixPresetString(String s) { 104 return s == null ? s : s.replace All("'", "''");104 return s == null ? s : s.replace("'", "''"); 105 105 } 106 106 -
trunk/src/org/openstreetmap/josm/gui/util/StayOpenCheckBoxMenuItemUI.java
r15288 r15293 66 66 } 67 67 68 /** 69 * Creates a new {@code StayOpenCheckBoxMenuItemUI}. 70 * @param c not used 71 * @return newly created {@code StayOpenCheckBoxMenuItemUI} 72 */ 68 73 public static ComponentUI createUI(JComponent c) { 69 74 return new StayOpenCheckBoxMenuItemUI(); -
trunk/src/org/openstreetmap/josm/io/CachedFile.java
r14535 r15293 422 422 } 423 423 prefKey.append(url.toString().replaceAll("%<(.*)>", "")); 424 return prefKey.toString().replace All("=", "_");424 return prefKey.toString().replace("=", "_"); 425 425 } 426 426 -
trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java
r14177 r15293 229 229 if (line != null && !line.isEmpty()) { 230 230 line = line.replaceAll("\"+", ""); 231 line = line.replace All("NAME=", ""); // strange code for some Gentoo's231 line = line.replace("NAME=", ""); // strange code for some Gentoo's 232 232 if (line.startsWith("Linux ")) // e.g. Linux Mint 233 233 return line; -
trunk/src/org/openstreetmap/josm/tools/TextUtils.java
r13978 r15293 19 19 */ 20 20 public static String wrapLongUrl(String url) { 21 return url.replace All("/", "/\u200b").replaceAll("&", "&\u200b");21 return url.replace("/", "/\u200b").replace("&", "&\u200b"); 22 22 } 23 23 } -
trunk/src/org/openstreetmap/josm/tools/WikiReader.java
r14119 r15293 107 107 for (String line = in.readLine(); line != null; line = in.readLine()) { 108 108 if (!line.contains("[[TranslatedPages]]")) { 109 b.append(line.replace All(" />", ">")).append('\n');109 b.append(line.replace(" />", ">")).append('\n'); 110 110 } 111 111 } … … 140 140 // will render a thick border around images inside an <a> element 141 141 // remove width information to avoid distorded images (fix #11262) 142 b.append(line.replace All("<img ", "<img border=\"0\" ")142 b.append(line.replace("<img ", "<img border=\"0\" ") 143 143 .replaceAll("width=\"(\\d+)\"", "") 144 144 .replaceAll("<span class=\"icon\">.</span>", "") 145 .replace All("href=\"/", "href=\"" + baseurl + '/')146 .replace All(" />", ">"))145 .replace("href=\"/", "href=\"" + baseurl + '/') 146 .replace(" />", ">")) 147 147 .append('\n'); 148 148 } else if (transl && line.contains("</div>")) {
Note:
See TracChangeset
for help on using the changeset viewer.