private void reportIOErrorWithJars(File original, File target, IOException e) { LOG.warn(e); String path = original.getPath(); myFileSystem.setNoCopyJarForPath(path); String message = VfsBundle.message("jar.copy.error.message", path, target.getPath(), e.getMessage()); ERROR_COPY_NOTIFICATION .getValue() .createNotification(message, NotificationType.ERROR) .notify(null); }
@NotNull private File copyToMirror(@NotNull File original, @NotNull File mirror) { ProgressIndicator progress = ProgressManager.getInstance().getProgressIndicator(); if (progress != null) { progress.pushState(); progress.setText(VfsBundle.message("jar.copy.progress", original.getPath())); progress.setFraction(0); } try { FileUtil.copy(original, mirror); } catch (final IOException e) { reportIOErrorWithJars(original, mirror, e); return original; } if (progress != null) { progress.popState(); } return mirror; }
@NotNull @Override protected NotificationGroup compute() { return NotificationGroup.balloonGroup(VfsBundle.message("jar.copy.error.title")); }