void (List<? extends PsiFile> added) { if (added.isEmpty()) return; Project project = added.get(0).getProject(); if (Registry.is("run.refactorings.under.progress")) { ApplicationManagerEx.getApplicationEx().runWriteActionWithNonCancellableProgressInDispatchThread( RefactoringBundle.message("progress.title.update.added.files"), project, null, pi -> UpdateAddedFileProcessor.updateAddedFiles(added)); } else { WriteAction.run(() -> UpdateAddedFileProcessor.updateAddedFiles(added)); } }