void () { SwingUtilities.invokeLater(() -> { final Editor editor = myEditorTextField.getEditor(); if (editor != null) { IdeFocusManager.getGlobalInstance().doWhenFocusSettlesDown(() -> IdeFocusManager.getGlobalInstance().requestFocus(editor.getContentComponent(), true)); } myEditorTextField.selectAll(); }); }