void () { myNameSuggestionsManager = new NameSuggestionsManager(myTypeSelector, myNameField, JavaNameSuggestionUtil.createFieldNameGenerator(myWillBeDeclaredStatic, myLocalVariable, myInitializerExpression, myIsInvokedOnDeclaration, myEnteredName, myParentClass, myProject)); myNameSuggestionsManager.setLabelsFor(type, namePrompt); Editor editor = myNameField.getEditor(); if (editor != null) { editor.getSelectionModel().setSelection(0, editor.getDocument().getTextLength()); } }