public static void setPreferredWidthToFitText(@NotNull TextFieldWithHistoryWithBrowseButton component) {
    int childWidth = calcWidthToFitText(component.getChildComponent().getTextEditor(), JBUIScale.scale(32));
    setPreferredWidthForComponentWithBrowseButton(component, childWidth);
  }
public static void setPreferredWidthToFitText(@NotNull TextFieldWithHistoryWithBrowseButton component)