void (boolean enable) { if (!isInitialized || !isAvailable()) { return; } if (!enable) { if (isEnabled) { Toolkit.getDefaultToolkit().removeAWTEventListener(ourAWTEventListener); TouchBarsManager.clearAll(); CtxDefault.disable(); CtxToolWindows.disable(); if (ourConnection != null) { ourConnection.disconnect(); } ourConnection = null; CustomActionsSchema.removeSettingsGroup(IdeActions.GROUP_TOUCHBAR); isEnabled = false; } return; } if (!isEnabled && Registry.is(IS_ENABLED_KEY)) { enableSupport(); } }