boolean (VirtualFile @NotNull [] files, @NotNull Project project) { PsiManager psiManager = PsiManager.getInstance(project); return Stream.of(files) .map(psiManager::findFile) .filter(Objects::nonNull) .flatMap(file -> OptimizeImportsProcessor.collectOptimizers(file).stream()) .findFirst().isPresent(); }