void (final @NotNull EditorMouseMotionListener listener) { assertValid(); EditorMouseMotionListener wrapper = new EditorMouseMotionListener() { @Override public void mouseMoved(@NotNull EditorMouseEvent e) { listener.mouseMoved(convertEvent(e)); } @Override public void mouseDragged(@NotNull EditorMouseEvent e) { listener.mouseDragged(convertEvent(e)); } }; myEditorMouseMotionListeners.registerWrapper(listener, wrapper); myDelegate.addEditorMouseMotionListener(wrapper); }