void (@NotNull FileEditorPositionListener listener) { if (myEditor != null && myListeners.isEmpty()) { myEditorCaretListenerDisposable = Disposer.newDisposable(); EditorFactory.getInstance().getEventMulticaster().addCaretListener(myEditorCaretListener, myEditorCaretListenerDisposable); } myListeners.add(listener); }