EditorEx () { if (myDisposable == null) { initEditorDisposables(); } if (myEditor != null) { releaseEditorLater(); } boolean isFocused = isFocusOwner(); EditorEx editor = initEditorInner(); onEditorAdded(editor); if (myNextFocusable != null) { editor.getContentComponent().setNextFocusableComponent(myNextFocusable); myNextFocusable = null; } revalidate(); if (isFocused) { IdeFocusManager.getGlobalInstance().doWhenFocusSettlesDown(() -> requestFocus()); } return editor; }