JBIterable<FilePath> (@NotNull DataContext context) { Iterable<FilePath> paths = VcsDataKeys.FILE_PATHS.getData(context); if (paths != null) { return JBIterable.from(paths); } FilePath path = VcsDataKeys.FILE_PATH.getData(context); if (path != null) { return JBIterable.of(path); } JBIterable<VirtualFile> virtualFiles = selectedFilesIterable(context); if (virtualFiles.isNotEmpty()) { return virtualFiles.map(VcsUtil::getFilePath); } return JBIterable.empty(); }