void (@NotNull VirtualFile root, boolean visible) { Set<VirtualFile> roots = getAllRoots(); VcsLogRootFilter rootFilter = getRootFilter(myFilterModel.getFilter()); Collection<VirtualFile> visibleRoots; if (rootFilter == null) { visibleRoots = visible ? roots : ContainerUtil.subtract(roots, Collections.singleton(root)); } else { visibleRoots = visible ? ContainerUtil.union(new HashSet<>(rootFilter.getRoots()), Collections.singleton(root)) : ContainerUtil.subtract(rootFilter.getRoots(), Collections.singleton(root)); } myFilterModel.setFilter(new FilterPair<>(null, VcsLogFilterObject.fromRoots(visibleRoots))); }