Changeset 2567 in josm
- Timestamp:
- 2009-12-03T23:21:53+01:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/actions/search
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java
r2512 r2567 124 124 + "<li>"+tr("<b>type:</b> - type of the object (<b>node</b>, <b>way</b>, <b>relation</b>)")+"</li>" 125 125 + "<li>"+tr("<b>user:</b>... - all objects changed by user")+"</li>" 126 + "<li>"+tr("<b>user:anonymous</b> - all objects changed by anonymous users")+"</li>" 126 127 + "<li>"+tr("<b>id:</b>... - object with given ID (0 for new objects)")+"</li>" 127 128 + "<li>"+tr("<b>nodes:</b>... - object with given number of nodes")+"</li>" -
trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java
r2565 r2567 389 389 private User user; 390 390 public UserMatch(String user) { 391 List<User> users = User.getByName(user); 392 if (!users.isEmpty()) { 393 // selecting an arbitrary user 394 this.user = users.get(0); 395 } else { 396 user = null; 397 } 398 } 391 if (user.equals("anonymous")) { 392 this.user = null; 393 } else { 394 List<User> users = User.getByName(user); 395 if (!users.isEmpty()) { 396 // selecting an arbitrary user 397 this.user = users.get(0); 398 } else { 399 this.user = User.createLocalUser(user); 400 } 401 } 402 } 403 399 404 @Override public boolean match(OsmPrimitive osm) { 400 405 if (osm.getUser() == null && user == null) return true; … … 402 407 return osm.getUser().equals(user); 403 408 } 409 404 410 @Override public String toString() { 405 411 return "user=" + user == null ? "" : user.getName();
Note:
See TracChangeset
for help on using the changeset viewer.