List<VirtualFile> (String changeListName, Project project) { final ChangeListManager changeListManager = ChangeListManager.getInstance(project); if ("All".equals(changeListName)) { return changeListManager.getAffectedFiles(); } final LocalChangeList changeList = changeListManager.findChangeList(changeListName); if (changeList != null) { List<VirtualFile> files = new ArrayList<>(); for (Change change : changeList.getChanges()) { final ContentRevision afterRevision = change.getAfterRevision(); if (afterRevision != null) { final VirtualFile file = afterRevision.getFile().getVirtualFile(); if (file != null) { files.add(file); } } } return files; } return Collections.emptyList(); }