Set<VirtualFile> (final AnActionEvent e, Project project) { final List<VirtualFile> selectedModifiedWithoutEditing = e.getData(VcsDataKeys.MODIFIED_WITHOUT_EDITING_DATA_KEY); if (!ContainerUtil.isEmpty(selectedModifiedWithoutEditing)) { return new HashSet<>(selectedModifiedWithoutEditing); } final VirtualFile[] virtualFiles = e.getData(CommonDataKeys.VIRTUAL_FILE_ARRAY); if (!ArrayUtil.isEmpty(virtualFiles)) { Set<VirtualFile> modifiedWithoutEditing = new HashSet<>(ChangeListManager.getInstance(project).getModifiedWithoutEditing()); Set<VirtualFile> files = ContainerUtil.newHashSet(virtualFiles); modifiedWithoutEditing.retainAll(files); return modifiedWithoutEditing; } return null; }