return null;
}
public ChangesetQuery buildChangesetQuery() {
BasicQuery q = getSelectedQuery();
ChangesetQuery query = new ChangesetQuery();
JosmUserIdentityManager im = JosmUserIdentityManager.getInstance();
if (q == null)
return query;
switch(q) {
case MOST_RECENT_CHANGESETS:
break;
case MY_OPEN_CHANGESETS:
query = query.beingOpen(true);
break;
case CHANGESETS_IN_MAP_VIEW:
Bounds b = Main.map.mapView.getLatLonBounds(Main.map.mapView.getBounds());
query = query.inBbox(b);
break;
}
if (cbMyChangesetsOnly.isSelected()) {
if (im.isPartiallyIdentified()) {
query = query.forUser(im.getUserName());
} else if (im.isFullyIdentified()) {
query = query.forUser(im.getUserId()).beingOpen(true);
} else
// anonymous -- can happen with a fresh config.
throw new IllegalStateException(tr("Cannot create changeset query for open changesets of anonymous user"));
}