void (@NotNull AnActionEvent e, boolean state) { PropertiesComponent.getInstance().setValue(PROP_KEY, state, IS_ENABLED_BY_DEFAULT); Project project = e.getProject(); if (project != null) { var window = ToolWindowManager.getInstance(project).getToolWindow(ToolWindowId.DEBUG); if (window != null) { for (Content content : window.getContentManager().getContents()) { var context = DataManager.getInstance().getDataContext(content.getComponent()); findAllFieldsAndUpdateState(context, state); } } } // fallback in case of Services tool window findAllFieldsAndUpdateState(e.getDataContext(), state); }