void (@NotNull JComponent component, @NlsSafe String name, @NlsSafe String value) { JTextComponent textComponent = null; if (component instanceof JTextComponent) { textComponent = (JTextComponent)component; } else if (component instanceof TextFieldWithBrowseButton) { textComponent = ((TextFieldWithBrowseButton)component).getTextField(); } if (textComponent != null) { textComponent.setText(value); textComponent.selectAll(); } component.setToolTipText(name); }