void (InputMethodEvent e) { if (EditorImpl.EVENT_LOG.isDebugEnabled()) { EditorImpl.EVENT_LOG.debug(e.toString()); } // Don't dispatch to super first; now that EdditorComponentImpl is a JTextComponent, // this would have the side effect of invoking Swing document machinery which relies // on creating Document positions etc (and won't update the document in an IntelliJ safe // way, such as running through all the carets etc. // super.processInputMethodEvent(e); if (!e.isConsumed()) { switch (e.getID()) { case InputMethodEvent.INPUT_METHOD_TEXT_CHANGED: myEditor.replaceInputMethodText(e); // No breaks over here. case InputMethodEvent.CARET_POSITION_CHANGED: myEditor.inputMethodCaretPositionChanged(e); e.consume(); break; } } super.processInputMethodEvent(e); }