void (@NotNull AnActionEvent event) { final DataContext dataContext = event.getDataContext(); final Project project = CommonDataKeys.PROJECT.getData(dataContext); if (project == null) { return; } final VirtualFile[] virtualFiles = CommonDataKeys.VIRTUAL_FILE_ARRAY.getData(dataContext); if (virtualFiles == null) { return; } Path directoryStorePath = ProjectKt.getStateStore(project).getDirectoryStorePath(); VirtualFile projectVirtualDirectory = directoryStorePath == null ? null : StandardFileSystems.local().findFileByPath(FileUtil.toSystemIndependentName(directoryStorePath.toString())); FileTypeRegistry fileTypeManager = FileTypeRegistry.getInstance(); for (VirtualFile file : virtualFiles) { VfsUtilCore.visitChildrenRecursively(file, new VirtualFileVisitor<Void>() { @Override public @NotNull Result visitFileEx(@NotNull VirtualFile file) { if (shouldProcess(file)) { changeLineSeparators(project, file, mySeparator); } return file.isDirectory() && (file.equals(projectVirtualDirectory) || fileTypeManager.isFileIgnored(file)) ? SKIP_CHILDREN : CONTINUE; } }); } }