void (@NotNull AnActionEvent e) { boolean enabled = myToggleRegularExpression != null && !myToggleRegularExpression.isSelected(e); boolean visible = mySearchReplaceComponent == null || !mySearchReplaceComponent.isMultiline(); e.getPresentation().setEnabled(enabled); e.getPresentation().setVisible(visible); setSelected(e, isSelected(e) && enabled && visible); super.update(e); }