void (@NotNull ProgressIndicator indicator) { try { for (final VirtualFile file : files) { indicator.checkCanceled(); ReadAction.run(() -> { try { packageFile(file, project, artifacts, packIntoArchives); } catch (IOException e) { LOG.info(e); String message = JavaCompilerBundle.message("message.tect.package.file.io.error", e.toString()); Notifications.Bus.notify(new Notification("Package File", JavaCompilerBundle.message("cannot.package.file"), message, NotificationType.ERROR)); } }); callback.setDone(); } } finally { if (!callback.isDone()) { callback.setRejected(); } } }