Search in sources :

Example 1 with VcsGoToRefComparator

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());
}
Also used : VirtualFile(com.intellij.openapi.vfs.VirtualFile) Project(com.intellij.openapi.project.Project) VcsGoToRefComparator(com.intellij.vcs.log.impl.VcsGoToRefComparator) VcsLog(com.intellij.vcs.log.VcsLog) AbstractVcsLogUi(com.intellij.vcs.log.ui.AbstractVcsLogUi) AbstractVcsLogUi(com.intellij.vcs.log.ui.AbstractVcsLogUi) VcsLogUi(com.intellij.vcs.log.VcsLogUi)

Aggregations

Project (com.intellij.openapi.project.Project)1 VirtualFile (com.intellij.openapi.vfs.VirtualFile)1 VcsLog (com.intellij.vcs.log.VcsLog)1 VcsLogUi (com.intellij.vcs.log.VcsLogUi)1 VcsGoToRefComparator (com.intellij.vcs.log.impl.VcsGoToRefComparator)1 AbstractVcsLogUi (com.intellij.vcs.log.ui.AbstractVcsLogUi)1