public static void showHistoryForSelection(VcsSelection selection, Project project) {
    final VirtualFile file = FileDocumentManager.getInstance().getFile(selection.getDocument());
    assert file != null;

    final AbstractVcs activeVcs = ProjectLevelVcsManager.getInstance(project).getVcsFor(file);
    assert activeVcs != null;

    final VcsHistoryProvider provider = activeVcs.getVcsBlockHistoryProvider();
    assert provider != null;

    final int selectionStart = selection.getSelectionStartLineNumber();
    final int selectionEnd = selection.getSelectionEndLineNumber();

    VcsSelectionHistoryDialog dialog = new VcsSelectionHistoryDialog(project,
                                                                     file,
                                                                     selection.getDocument(),
                                                                     provider,
                                                                     activeVcs,
                                                                     Math.min(selectionStart, selectionEnd),
                                                                     Math.max(selectionStart, selectionEnd),
                                                                     selection.getDialogTitle());
    dialog.show();
  }
public static void showHistoryForSelection(VcsSelection selection, Project project)