diff --git a/platform/vcs-log/graph/src/com/intellij/vcs/log/graph/collapsing/BranchFilterController.java b/platform/vcs-log/graph/src/com/intellij/vcs/log/graph/collapsing/BranchFilterController.java index c45d60023d75..6311a96081b0 100644 --- a/platform/vcs-log/graph/src/com/intellij/vcs/log/graph/collapsing/BranchFilterController.java +++ b/platform/vcs-log/graph/src/com/intellij/vcs/log/graph/collapsing/BranchFilterController.java @@ -29,26 +29,25 @@ import java.util.Set; public class BranchFilterController extends CascadeController { @NotNull private CollapsedGraph myCollapsedGraph; - @Nullable private final Set myIdsOfVisibleBranches; + @NotNull private final UnsignedBitSet myVisibility; public BranchFilterController(@NotNull LinearGraphController delegateLinearGraphController, @NotNull PermanentGraphInfo permanentGraphInfo, @Nullable Set idsOfVisibleBranches) { super(delegateLinearGraphController, permanentGraphInfo); - myIdsOfVisibleBranches = idsOfVisibleBranches; - myCollapsedGraph = updateCollapsedGraph(); + myVisibility = ReachableNodes.getReachableNodes(myPermanentGraphInfo.getLinearGraph(), idsOfVisibleBranches); + myCollapsedGraph = update(); } @NotNull - private CollapsedGraph updateCollapsedGraph() { - UnsignedBitSet initVisibility = ReachableNodes.getReachableNodes(myPermanentGraphInfo.getLinearGraph(), myIdsOfVisibleBranches); - return CollapsedGraph.newInstance(getDelegateController().getCompiledGraph(), initVisibility); + private CollapsedGraph update() { + return CollapsedGraph.newInstance(getDelegateController().getCompiledGraph(), myVisibility); } @NotNull @Override protected LinearGraphAnswer delegateGraphChanged(@NotNull LinearGraphAnswer delegateAnswer) { - if (delegateAnswer.getGraphChanges() != null) myCollapsedGraph = updateCollapsedGraph(); + if (delegateAnswer.getGraphChanges() != null) myCollapsedGraph = update(); return delegateAnswer; }