EditorTextField (final @NotNull TextPanel panel) { final Component component = panel.getComponent(0); if (component instanceof ReferenceEditorWithBrowseButton) { return ((ReferenceEditorWithBrowseButton)component).getEditorTextField(); } return (EditorTextField)component; }