void (@NotNull Editor editor, @Nullable Caret caret, DataContext dataContext) { Editor hostEditor = editor instanceof EditorWindow ? ((EditorWindow)editor).getDelegate() : editor; if (hostEditor.getUserData(Holder.LISTENER_ADDED) != null) { cleanup(hostEditor); } else { myDelegate.execute(editor, caret, dataContext); } }