use of com.intellij.vcs.log.graph.impl.facade.BaseController in project intellij-community by JetBrains.
the class SnapshotVisiblePackBuilder method build.
@NotNull
private VisiblePack build(@NotNull DataPackBase oldPack, @NotNull VisibleGraphImpl<Integer> oldGraph, @NotNull VcsLogFilterCollection filters) {
final PermanentGraphInfo<Integer> info = oldGraph.buildSimpleGraphInfo();
Set<Integer> heads = ContainerUtil.map2Set(info.getPermanentGraphLayout().getHeadNodeIndex(), integer -> info.getPermanentCommitsInfo().getCommitId(integer));
RefsModel newRefsModel = createRefsModel(oldPack.getRefsModel(), heads, oldGraph, oldPack.getLogProviders());
DataPackBase newPack = new DataPackBase(oldPack.getLogProviders(), newRefsModel, false);
GraphColorManagerImpl colorManager = new GraphColorManagerImpl(newRefsModel, VcsLogStorageImpl.createHashGetter(myStorage), DataPack.getRefManagerMap(oldPack.getLogProviders()));
VisibleGraph<Integer> newGraph = new VisibleGraphImpl<>(new CollapsedController(new BaseController(info), info, null), info, colorManager);
return new VisiblePack(newPack, newGraph, true, filters);
}
Aggregations