// nothing to do?
if (tasks.isEmpty())
return;
ProgressDialog p = null;
if (window != null)
p = ProgressDialog.create(window, resource
.getString("ExportAutoExporting"), resource
.getString("ExportExportingDataDots"));
final ExportJanitor janitor = new ExportJanitor(data);
janitor.startExportAllOperation();
fireEvent(EXPORT_STARTING, EXPORT_ALL_PATH);
for (Iterator iter = tasks.iterator(); iter.hasNext();) {
AbstractInstruction instr = (AbstractInstruction) iter.next();
Runnable exporter = getExporter(instr);
if (instr.isEnabled()) {
if (p != null)
p.addTask(exporter);
else
exporter.run();
}
}
if (p != null) {
p.addTask(new Runnable() { public void run() {
janitor.finishExportAllOperation(); }});
p.run();
} else {
janitor.finishExportAllOperation();
}