public IStatus execute(IProgressMonitor monitor, IAdaptable info)\r
throws ExecutionException {\r
\r
- // Start the main progress monitor.\r
- IProgressMonitor newMonitor = StoreUtil.startMainMonitor(monitor,"Creating Image", 3);\r
- \r
- // Do one step\r
- newMonitor.worked(1);\r
+ if (imageFile == null) {\r
+ imageFile = ImageFile.NewInstance(null, null);\r
+ }\r
+ monitor.worked(20);\r
\r
- try {\r
- // Operation steps\r
- \r
- if (imageFile == null) {\r
- imageFile = ImageFile.NewInstance(null, null);\r
- }\r
- StoreUtil.isCanceled(newMonitor, 1);\r
+ ImagesUtility.addTaxonImage(taxon, description, imageFile);\r
+ monitor.worked(40);\r
\r
- ImagesUtility.addTaxonImage(taxon, description, imageFile);\r
- StoreUtil.isCanceled(newMonitor, 1);\r
- }\r
- finally {\r
- \r
- // Stop the progress monitor.\r
- newMonitor.done();\r
- }\r
- \r
return postExecute(imageFile);\r
}\r
\r