Changeset 15850 in josm
- Timestamp:
- 2020-02-13T16:11:24+01:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/scripts/SyncEditorLayerIndex.java
r15712 r15850 110 110 private static boolean optionNoEli; 111 111 private Map<String, String> skip = new HashMap<>(); 112 private Map<String, String> skipStart = new HashMap<>(); 112 113 113 114 /** … … 249 250 Matcher res = pattern.matcher(line); 250 251 if (res.matches()) { 251 if ("Ignore".equals(res.group(1))) { 252 skip.put(res.group(2), "green"); 253 } else { 254 skip.put(res.group(2), "darkgoldenrod"); 252 String s = res.group(2); 253 if(s.endsWith("...")) 254 { 255 s = s.substring(0, s.length() - 3); 256 if ("Ignore".equals(res.group(1))) { 257 skipStart.put(s, "green"); 258 } else { 259 skipStart.put(s, "darkgoldenrod"); 260 } 261 } 262 else 263 { 264 if ("Ignore".equals(res.group(1))) { 265 skip.put(s, "green"); 266 } else { 267 skip.put(s, "darkgoldenrod"); 268 } 255 269 } 256 270 } … … 271 285 } 272 286 287 String isSkipString(String s) { 288 if (skip.containsKey(s)) 289 return skip.get(s); 290 for (Entry<String, String> str : skipStart.entrySet()) { 291 if (s.startsWith(str.getKey())) 292 return str.getValue(); 293 } 294 return null; 295 } 296 273 297 void myprintln(String s) { 274 if (skip.containsKey(s)) {275 Stringcolor =skip.get(s);298 String color; 299 if ((color = isSkipString(s)) != null) { 276 300 skip.remove(s); 277 301 if (optionXhtmlBody || optionXhtml) { … … 283 307 } 284 308 } else if (optionXhtmlBody || optionXhtml) { 285 Stringcolor =309 color = 286 310 s.startsWith("***") ? "black" : 287 311 ((s.startsWith("+ ") || s.startsWith("+++ ELI")) ? "blue" :
Note:
See TracChangeset
for help on using the changeset viewer.