Search in sources :

Example 1 with AbstractVcsHelperImpl

use of com.intellij.openapi.vcs.impl.AbstractVcsHelperImpl in project intellij-community by JetBrains.

the class TabbedShowHistoryForRevisionAction method actionPerformed.

@Override
public void actionPerformed(@NotNull AnActionEvent event) {
    Project project = event.getRequiredData(CommonDataKeys.PROJECT);
    AbstractVcs vcs = assertNotNull(getVcs(project, event.getData(VcsDataKeys.VCS)));
    VcsHistoryProviderEx vcsHistoryProvider = assertNotNull((VcsHistoryProviderEx) vcs.getVcsHistoryProvider());
    Change change = event.getRequiredData(VcsDataKeys.SELECTED_CHANGES)[0];
    ContentRevision revision = assertNotNull(getContentRevision(change));
    AbstractVcsHelperImpl helper = assertNotNull(getVcsHelper(project));
    helper.showFileHistory(vcsHistoryProvider, revision.getFile(), vcs, revision.getRevisionNumber());
}
Also used : Project(com.intellij.openapi.project.Project) VcsHistoryProviderEx(com.intellij.vcs.history.VcsHistoryProviderEx) ContentRevision(com.intellij.openapi.vcs.changes.ContentRevision) AbstractVcsHelperImpl(com.intellij.openapi.vcs.impl.AbstractVcsHelperImpl) Change(com.intellij.openapi.vcs.changes.Change)

Aggregations

Project (com.intellij.openapi.project.Project)1 Change (com.intellij.openapi.vcs.changes.Change)1 ContentRevision (com.intellij.openapi.vcs.changes.ContentRevision)1 AbstractVcsHelperImpl (com.intellij.openapi.vcs.impl.AbstractVcsHelperImpl)1 VcsHistoryProviderEx (com.intellij.vcs.history.VcsHistoryProviderEx)1