void () { Editor editor = getEditor(true); if (editor != null) { IdeFocusManager.getGlobalInstance().requestFocus(editor.getContentComponent(), true); editor.getScrollingModel().scrollToCaret(ScrollType.RELATIVE); } else { super.requestFocus(); } }