@Override
  public void actionPerformed(@NotNull AnActionEvent e) {
    DataContext context = e.getDataContext();
    VirtualFile[] files = CommonDataKeys.VIRTUAL_FILE_ARRAY.getData(context);
    if (files == null || files.length != 3) {
      return;
    }

    DiffRequestFactory diffRequestFactory = DiffRequestFactory.getInstance();

    try {
      Project project = CommonDataKeys.PROJECT.getData(context);

      String title = DiffBundle.message("merge.files.dialog.title");
      List<String> titles = Arrays.asList(files[0].getPresentableUrl(), files[1].getPresentableUrl(), files[2].getPresentableUrl());

      VirtualFile outputFile = files[1];
      List<VirtualFile> contents = Arrays.asList(files[0], files[1], files[2]);

      MergeRequest request = diffRequestFactory.createMergeRequestFromFiles(project, outputFile, contents, title, titles, null);
      request.putUserData(DiffUserDataKeys.HELP_ID, "cvs.merge");

      DiffManager.getInstance().showMerge(project, request);
    }
    catch (InvalidDiffRequestException err) {
      Messages.showErrorDialog(err.getMessage(), DiffBundle.message("merge.files.dialog.title"));
    }
  }
@Override
  public void actionPerformed(@NotNull AnActionEvent e)