Search in sources :

Example 1 with BaseController

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);
}
Also used : VisibleGraphImpl(com.intellij.vcs.log.graph.impl.facade.VisibleGraphImpl) GraphColorManagerImpl(com.intellij.vcs.log.graph.GraphColorManagerImpl) BaseController(com.intellij.vcs.log.graph.impl.facade.BaseController) CollapsedController(com.intellij.vcs.log.graph.collapsing.CollapsedController) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

GraphColorManagerImpl (com.intellij.vcs.log.graph.GraphColorManagerImpl)1 CollapsedController (com.intellij.vcs.log.graph.collapsing.CollapsedController)1 BaseController (com.intellij.vcs.log.graph.impl.facade.BaseController)1 VisibleGraphImpl (com.intellij.vcs.log.graph.impl.facade.VisibleGraphImpl)1 NotNull (org.jetbrains.annotations.NotNull)1