void (final @NotNull AnActionEvent e) { ThreeStateCheckBox.State state = isSelected(e); Presentation presentation = e.getPresentation(); presentation.putClientProperty(STATE_PROPERTY, state); setSelected(e, ThreeStateCheckBox.nextState(state, true)); }