ReferenceEditorComboWithBrowseButton () { final ReferenceEditorComboWithBrowseButton packageChooser = new PackageNameReferenceEditorCombo("", myProject, RECENTS_KEY, RefactoringBundle.message("choose.destination.package")); final Document document = packageChooser.getChildComponent().getDocument(); document.addDocumentListener(new DocumentListener() { @Override public void documentChanged(@NotNull DocumentEvent e) { validateButtons(); } }); return packageChooser; }