void (TypeConstraint[] typeConstraints) { final EditorComboBoxEditor comboEditor = new EditorComboBoxEditor(myProject, GroovyFileType.GROOVY_FILE_TYPE); final Document document = createDocument(""); LOG.assertTrue(document != null); comboEditor.setItem(document); myTypeComboBox.setEditor(comboEditor); myTypeComboBox.setEditable(true); myTypeComboBox.grabFocus(); PsiType type = typeConstraints.length == 1 ? typeConstraints[0].getDefaultType() : TypesUtil.getJavaLangObject(myContext); myTypeComboBox.getEditor().setItem(createDocument(type.getCanonicalText())); }