Changeset 18737 in osm for applications/editors/josm/plugins
- Timestamp:
- 2009-11-22T15:04:33+01:00 (15 years ago)
- Location:
- applications/editors/josm/plugins/validator
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/validator/ignoretags.cfg
r16967 r18737 249 249 T:religion=christian|denomination=greek_orthodox 250 250 T:religion=jewish|denomination=hasidic 251 T:religion=jewish|denomination=humanistic 251 T:religion=jewish|denomination=humanistic 252 252 T:religion=muslim|denomination=ibadi 253 253 T:religion=muslim|denomination=ismaili 254 254 T:religion=christian|denomination=jehovahs_witness 255 255 T:religion=christian|denomination=kabbalah 256 T:religion=christian|denomination=karaite 257 T:religion=jewish|denomination=liberal 256 T:religion=christian|denomination=karaite 257 T:religion=jewish|denomination=liberal 258 258 T:religion=christian|denomination=living_waters_church 259 259 T:religion=christian|denomination=lutheran … … 270 270 T:religion=muslim|denomination=nondenominational 271 271 T:religion=christian|denomination=old_catholic 272 T:religion=christian|denomination=orthodox 273 T:religion=jewish|denomination=orthodox 272 T:religion=christian|denomination=orthodox 273 T:religion=jewish|denomination=orthodox 274 274 T:religion=christian|denomination=pentecostal 275 275 T:religion=christian|denomination=presbyterian 276 T:religion=jewish|denomination=progressive 276 T:religion=jewish|denomination=progressive 277 277 T:religion=christian|denomination=protestant 278 278 T:religion=christian|denomination=quaker 279 279 T:religion=jewish|denomination=reconstructionist 280 280 T:religion=jewish|denomination=reform 281 T:religion=jewish|denomination=renewal 281 T:religion=jewish|denomination=renewal 282 282 T:religion=christian|denomination=roman_catholic 283 283 T:religion=christian|denomination=russian_orthodox … … 286 286 T:religion=christian|denomination=seventh_day_adventist 287 287 T:religion=muslim|denomination=shia 288 T:religion=muslim|denomination=sunni 288 T:religion=muslim|denomination=sunni 289 289 T:religion=jewish|denomination=ultra_orthodox 290 290 T:religion=christian|denomination=united -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ValidatorDialog.java
r18377 r18737 143 143 144 144 Set<DefaultMutableTreeNode> processedNodes = new HashSet<DefaultMutableTreeNode>(); 145 145 146 146 DuplicateNode.clearBackreferences(); 147 147 LinkedList<TestError> errorsToFix = new LinkedList<TestError>(); … … 160 160 Object nodeInfo = childNode.getUserObject(); 161 161 if (nodeInfo instanceof TestError) { 162 163 } 164 } 165 } 166 162 errorsToFix.add((TestError)nodeInfo); 163 } 164 } 165 } 166 167 167 // run fix task asynchronously 168 168 // … … 445 445 tree.setFilter(filter); 446 446 } 447 448 /** 449 * Task for fixing a collection of {@see TestError}s. Can be run asynchronously. 450 * 447 448 /** 449 * Task for fixing a collection of {@see TestError}s. Can be run asynchronously. 451 450 * 451 * 452 452 */ 453 453 class FixTask extends PleaseWaitRunnable { 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 try { 480 481 482 483 484 485 486 487 454 private Collection<TestError> testErrors; 455 private boolean canceled; 456 private LinkedList<Command> fixCommands; 457 458 459 public FixTask(Collection<TestError> testErrors) { 460 super(tr("Fixing errors ..."), false /* don't ignore exceptions */); 461 this.testErrors = testErrors == null ? new ArrayList<TestError> (): testErrors; 462 fixCommands = new LinkedList<Command>(); 463 } 464 465 @Override 466 protected void cancel() { 467 this.canceled = true; 468 } 469 470 @Override 471 protected void finish() { 472 // do nothing 473 } 474 475 @Override 476 protected void realRun() throws SAXException, IOException, 477 OsmTransferException { 478 ProgressMonitor monitor = getProgressMonitor(); 479 try { 480 monitor.setTicksCount(testErrors.size()); 481 int i=0; 482 for (TestError error: testErrors) { 483 i++; 484 monitor.subTask(tr("Fixing ({0}/{1}): ''{2}''", i, testErrors.size(),error.getMessage())); 485 if (this.canceled) 486 return; 487 final Command fixCommand = error.getFix(); 488 488 if (fixCommand != null) { 489 490 491 492 493 494 495 496 489 fixCommands.add(fixCommand); 490 SwingUtilities.invokeAndWait( 491 new Runnable() { 492 public void run() { 493 Main.main.undoRedo.addNoRedraw(fixCommand); 494 } 495 } 496 ); 497 497 error.setIgnored(true); 498 498 } 499 499 monitor.worked(1); 500 } 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 } 519 500 } 501 monitor.subTask(tr("Updating map ...")); 502 SwingUtilities.invokeAndWait(new Runnable() { 503 public void run() { 504 Main.main.undoRedo.afterAdd(); 505 Main.map.repaint(); 506 tree.resetErrors(); 507 Main.main.getCurrentDataSet().fireSelectionChanged(); 508 } 509 }); 510 } catch(InterruptedException e) { 511 // FIXME: signature of realRun should have a generic checked exception we 512 // could throw here 513 throw new RuntimeException(e); 514 } catch(InvocationTargetException e) { 515 throw new RuntimeException(e); 516 } finally { 517 monitor.finishTask(); 518 } 519 } 520 520 } 521 521 } -
applications/editors/josm/plugins/validator/tagchecker.cfg
r16439 r18737 75 75 node : I : amenity == /restaurant|cafe|fast_food/ && name != * # restaurant without name 76 76 #way : I : highway != * && railway != * && waterway != * && name == * # unusual named way type 77 * : W : natural == water && waterway == * # unusual tag combination 77 #* : W : natural == water && waterway == * # unusual tag combination 78 78 * : W : highway == * && waterway == * # unusual tag combination 79 79 * : W : highway == * && natural == * # unusual tag combination
Note:
See TracChangeset
for help on using the changeset viewer.