Changeset 9397 in josm for trunk/src/org
- Timestamp:
- 2016-01-10T20:43:16+01:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java
r9349 r9397 1468 1468 @Override 1469 1469 protected Collection<Bounds> getBounds() { 1470 return Main.main .getCurrentDataSet() == null || Main.main.getCurrentDataSet().getDataSourceArea() == null1470 return Main.main == null || Main.main.getCurrentDataSet() == null || Main.main.getCurrentDataSet().getDataSourceArea() == null 1471 1471 ? null : Main.main.getCurrentDataSet().getDataSourceBounds(); 1472 1472 } … … 1475 1475 public String toString() { 1476 1476 return all ? "allindownloadedarea" : "indownloadedarea"; 1477 } 1478 } 1479 1480 /** 1481 * Matches objects which are not outside the source area ("downloaded area"). 1482 * Unlink {@link InDataSourceArea} this matches also if no source area is set (e.g., for new layers). 1483 */ 1484 public static class NotOutsideDataSourceArea extends InDataSourceArea { 1485 1486 /** 1487 * Constructs a new {@code NotOutsideDataSourceArea}. 1488 */ 1489 public NotOutsideDataSourceArea() { 1490 super(false); 1491 } 1492 1493 @Override 1494 protected Collection<Bounds> getBounds() { 1495 final Collection<Bounds> bounds = super.getBounds(); 1496 return bounds == null || bounds.isEmpty() ? Collections.singleton(Main.getProjection().getWorldBoundsLatLon()) : bounds; 1497 } 1498 1499 @Override 1500 public String toString() { 1501 return "NotOutsideDataSourceArea"; 1477 1502 } 1478 1503 } -
trunk/src/org/openstreetmap/josm/data/validation/Test.java
r9381 r9397 14 14 15 15 import org.openstreetmap.josm.Main; 16 import org.openstreetmap.josm.actions.search.SearchCompiler. InDataSourceArea;16 import org.openstreetmap.josm.actions.search.SearchCompiler.NotOutsideDataSourceArea; 17 17 import org.openstreetmap.josm.command.Command; 18 18 import org.openstreetmap.josm.command.DeleteCommand; … … 39 39 public class Test extends AbstractVisitor { 40 40 41 protected static final Predicate<OsmPrimitive> IN_DOWNLOADED_AREA = new InDataSourceArea(false);41 protected static final Predicate<OsmPrimitive> IN_DOWNLOADED_AREA = new NotOutsideDataSourceArea(); 42 42 43 43 /** Name of the test */
Note:
See TracChangeset
for help on using the changeset viewer.