private static @NotNull FrameDiffTool findFittedTool(@NotNull List<? extends DiffTool> tools,
                                                       @NotNull DiffContext diffContext,
                                                       @NotNull DiffRequest diffRequest,
                                                       @Nullable FrameDiffTool forcedDiffTool) {
    if (forcedDiffTool != null) {
      return forcedDiffTool.canShow(diffContext, diffRequest)
             ? forcedDiffTool
             : ErrorDiffTool.INSTANCE;
    }

    List<FrameDiffTool> fittedTools = filterFittedTools(tools, diffContext, diffRequest);
    FrameDiffTool tool = ContainerUtil.getFirstItem(fittedTools, ErrorDiffTool.INSTANCE);

    FrameDiffTool substitutor = findToolSubstitutor(tool, diffContext, diffRequest);
    if (substitutor != null) return substitutor;

    return tool;
  }
private static @NotNull FrameDiffTool findFittedTool(@NotNull List<? extends DiffTool> tools,
                                                       @NotNull DiffContext diffContext,
                                                       @NotNull DiffRequest diffRequest,
                                                       @Nullable FrameDiffTool forcedDiffTool)