void (@NotNull EditorFactoryEvent event) { final WeakReference<Component> cmpRef = ourEditors.remove(event.getEditor()); final Component cmp = cmpRef != null ? cmpRef.get() : null; if (cmp != null) { TouchBarsManager.unregister(cmp); } }