void (@NotNull AnActionEvent e) { Handler handler = getHandler(e); if (handler == null) return; boolean selected = !handler.isPinned; handler.setPinned(selected); Toggleable.setSelected(e.getPresentation(), selected); }