FileHistoryData (@NotNull Collection<? extends FilePath> paths) { if (paths.size() == 1 && ContainerUtil.getFirstItem(paths).isDirectory()) { return new DirectoryHistoryData(ContainerUtil.getFirstItem(paths)); } return new FileHistoryDataImpl(paths); }