String (@NotNull MergeResult result, @Nullable MergeRequest request, @Nullable MergeContext context) { Function<MergeResult, @Nls String> getter = DiffUtil.getUserData(request, context, DiffUserDataKeysEx.MERGE_ACTION_CAPTIONS); String message = getter != null ? getter.fun(result) : null; if (message != null) return message; return DiffBundle.message(switch (result) { case CANCEL -> "button.merge.resolve.cancel"; case LEFT -> "button.merge.resolve.accept.left"; case RIGHT -> "button.merge.resolve.accept.right"; case RESOLVED -> "button.merge.resolve.apply"; }); }