Collection<VirtualFile> (VirtualFile[] files) { ArrayList<VirtualFile> result = new ArrayList<>(); if (files == null) return result; for (VirtualFile file : files) { if (myProgressIndicator != null) { myProgressIndicator.setText(VcsBundle.message("progress.text.searching.for.modified.files")); myProgressIndicator.setText2(file.getPresentableUrl()); } FileStatus status = myFileStatusManager.getStatus(file); if (status != FileStatus.NOT_CHANGED) { result.add(file); if (result.size() > 1) return result; } result.addAll(collectModifiedFiles(file.getChildren())); } return result; }