public void performAction(final ProgressMonitor pm) { outputFolder = requestFolderForSave("Download product(s) to folder", "snap.download.folder"); if (outputFolder == null) return; final ProductEntry[] selections = actionHandler.getSelectedProductEntries(); pm.beginTask("Downloading...", selections.length); try { final OpenData openData = new OpenData(COPERNICUS_HOST, COPERNICUS_ODATA_ROOT); for(ProductEntry entry : selections) { if (pm.isCanceled()) { SystemUtils.LOG.info("DownloadActionExt: Download is cancelled"); break; } OpenData.Entry oData = openData.getEntryByID(entry.getRefID()); SystemUtils.LOG.info(oData.fileName); openData.getProduct(entry.getRefID(), oData, outputFolder, new SubProgressMonitor(pm, 1)); } for (ActionExtListener listener : listenerList) { listener.notifyMSG(this, ActionExtListener.MSG.NEW_REPO); } } catch (Exception e) { Dialogs.showError("unable to download " + e.getMessage()); } finally { pm.done(); } }