void (@NotNull ProgressIndicator indicator) { List<File> deleted = new ArrayList<>(); for (Pair<File, Artifact> pair : toClean) { indicator.checkCanceled(); File file = pair.getFirst(); if (!FileUtil.delete(file)) { Holder.NOTIFICATION_GROUP .createNotification(JavaCompilerBundle.message("cannot.clean.0.artifact", pair.getSecond().getName()), JavaCompilerBundle.message("cannot.delete.0", file.getAbsolutePath()), NotificationType.ERROR) .notify(myProject); } else { deleted.add(file); } } LocalFileSystem.getInstance().refreshIoFiles(deleted, true, true, null); }