use of com.intellij.vcs.log.impl.VcsGoToRefComparator in project intellij-community by JetBrains.
the class GoToHashOrRefAction method actionPerformed.
@Override
public void actionPerformed(AnActionEvent e) {
VcsLogUtil.triggerUsage(e);
Project project = e.getRequiredData(CommonDataKeys.PROJECT);
VcsLog log = e.getRequiredData(VcsLogDataKeys.VCS_LOG);
VcsLogUi ui = e.getRequiredData(VcsLogDataKeys.VCS_LOG_UI);
assert ui instanceof AbstractVcsLogUi;
AbstractVcsLogUi logUi = (AbstractVcsLogUi) ui;
Set<VirtualFile> visibleRoots = VcsLogUtil.getVisibleRoots(logUi);
GoToHashOrRefPopup popup = new GoToHashOrRefPopup(project, logUi.getDataPack().getRefs(), visibleRoots, log::jumpToReference, vcsRef -> logUi.jumpToCommit(vcsRef.getCommitHash(), vcsRef.getRoot()), logUi.getColorManager(), new VcsGoToRefComparator(logUi.getDataPack().getLogProviders()));
popup.show(logUi.getTable());
}
Aggregations