}
@Override
protected void realRun() throws SAXException, IOException, OsmTransferException {
try {
final DataSet allDownloads = new DataSet();
int i=0;
getProgressMonitor().setTicksCount(relations.size());
for (Relation relation: relations) {
i++;
getProgressMonitor().setCustomText(tr("({0}/{1}): Downloading relation ''{2}''...", i,relations.size(),relation.getDisplayName(DefaultNameFormatter.getInstance())));
synchronized (this) {
if (canceled) return;
objectReader = new OsmServerObjectReader(relation.getPrimitiveId(), true /* full download */);
}
DataSet dataSet = objectReader.parseOsm(
getProgressMonitor().createSubTaskMonitor(0, false)
);
if (dataSet == null)
return;
synchronized (this) {