void (@NotNull Project project, @NotNull Document @NotNull [] documents) { if (DumbService.isDumb(project)) return; FileDocumentManager manager = FileDocumentManager.getInstance(); VirtualFile[] files = ContainerUtil.mapNotNull(documents, d -> manager.getFile(d)).toArray(VirtualFile.EMPTY_ARRAY); if (files.length == 0) { return; } AnalysisScope scope = new AnalysisScope(project, Arrays.asList(files)); UpdateCopyrightAction.UpdateCopyrightTask task = new UpdateCopyrightAction.UpdateCopyrightTask(project, scope, true, PerformInBackgroundOption.DEAF); ProgressManager.getInstance().run(task); }