void (@NotNull AnActionEvent e) { final ArrangementMatchingRulesControl control = getRulesControl(e); if (!(control instanceof ArrangementSectionRulesControl)) { e.getPresentation().setEnabledAndVisible(false); return; } e.getPresentation().setEnabledAndVisible(((ArrangementSectionRulesControl)control).getSectionRuleManager() != null); }