Search in sources :

Example 1 with StandardDiffFromHistoryHandler

use of com.intellij.openapi.vcs.history.StandardDiffFromHistoryHandler in project intellij-community by JetBrains.

the class ShowDiffWithLocalFromHistoryAction method performAction.

@Override
protected void performAction(@NotNull Project project, @NotNull FileHistoryUi ui, @NotNull VcsFullCommitDetails detail, @NotNull AnActionEvent e) {
    if (ChangeListManager.getInstance(project).isFreezedWithNotification(null))
        return;
    FilePath path = e.getRequiredData(VcsDataKeys.FILE_PATH);
    VcsFileRevision revision = ui.createRevision(detail);
    if (revision != null) {
        StandardDiffFromHistoryHandler handler = new StandardDiffFromHistoryHandler();
        handler.showDiffForTwo(project, path, revision, new CurrentRevision(notNull(path.getVirtualFile()), VcsRevisionNumber.NULL));
    }
}
Also used : FilePath(com.intellij.openapi.vcs.FilePath) StandardDiffFromHistoryHandler(com.intellij.openapi.vcs.history.StandardDiffFromHistoryHandler) VcsFileRevision(com.intellij.openapi.vcs.history.VcsFileRevision) CurrentRevision(com.intellij.openapi.vcs.history.CurrentRevision)

Aggregations

FilePath (com.intellij.openapi.vcs.FilePath)1 CurrentRevision (com.intellij.openapi.vcs.history.CurrentRevision)1 StandardDiffFromHistoryHandler (com.intellij.openapi.vcs.history.StandardDiffFromHistoryHandler)1 VcsFileRevision (com.intellij.openapi.vcs.history.VcsFileRevision)1