public static void updateEmptyText(@NotNull SearchReplaceComponent component,
                                     @NotNull FindModel findModel,
                                     @Nullable Editor editor) {
    if (component.getSearchTextComponent() instanceof ComponentWithEmptyText cweText) {
      String emptyText = StringUtil.capitalize(getEmptyText(findModel, editor));
      cweText.getEmptyText().setText(emptyText);
    }

    if (ExperimentalUI.isNewUI() &&
        findModel.isReplaceState() &&
        component.getReplaceTextComponent() instanceof ComponentWithEmptyText cweText) {
      String emptyText = findModel.getStringToReplace().isEmpty() ? ApplicationBundle.message("editorsearch.replace.hint") : "";
      cweText.getEmptyText().setText(emptyText);
    }
  }
public static void updateEmptyText(@NotNull SearchReplaceComponent component,
                                     @NotNull FindModel findModel,
                                     @Nullable Editor editor)