Revision 7e7d98aa
Added by Katja Luther almost 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/ExportManager.java | ||
---|---|---|
29 | 29 |
import org.eclipse.core.runtime.IProgressMonitor; |
30 | 30 |
import org.eclipse.core.runtime.IStatus; |
31 | 31 |
import org.eclipse.core.runtime.Status; |
32 |
import org.eclipse.core.runtime.SubMonitor; |
|
32 | 33 |
import org.eclipse.core.runtime.jobs.Job; |
33 | 34 |
import org.eclipse.swt.widgets.Display; |
34 | 35 |
|
... | ... | |
198 | 199 |
Job job = new Job("Export: " + configurator.getClass().getSimpleName()) { //$NON-NLS-1$ |
199 | 200 |
@Override |
200 | 201 |
protected IStatus run(IProgressMonitor monitor) { |
201 |
monitor.beginTask("Exporting database. This will take some time.", IProgressMonitor.UNKNOWN); |
|
202 |
SubMonitor subMonitor = SubMonitor.convert(monitor, 100); |
|
203 |
subMonitor.beginTask("Exporting database. This will take some time.", IProgressMonitor.UNKNOWN); |
|
202 | 204 |
try { |
203 | 205 |
IIOService ioService = CdmApplicationState.getIOService(); |
204 | 206 |
UUID uuid = ioService.monitExportData(configurator); |
... | ... | |
210 | 212 |
1000, |
211 | 213 |
ExportManager.this, |
212 | 214 |
feedBackGeneratorList, |
213 |
monitor);
|
|
215 |
subMonitor);
|
|
214 | 216 |
|
215 | 217 |
} catch (Exception ex) { |
216 | 218 |
return new Status(Status.ERROR, TaxeditorStorePlugin.PLUGIN_ID, "Operation Interrupted", ex); |
Also available in: Unified diff
minor