button.setCommandButtonKind(CommandButtonKind.POPUP_ONLY);
button.setPopupCallback(new PopupPanelCallback() {
public JPopupPanel getPopupPanel(JCommandButton commandButton) {
JCommandPopupMenu popupmenu = new JCommandPopupMenu();
final SetBooleanPropertyAction showAction = (SetBooleanPropertyAction) context.getBuilder().getMode().getAction("SetBooleanPropertyAction.show_node_tooltips");
final JCommandToggleMenuButton showButton = RibbonActionContributorFactory.createCommandToggleMenuButton(showAction);
showAction.setSelected();
showButton.getActionModel().setSelected(showAction.isSelected());
popupmenu.addMenuButton(showButton);
final SetBooleanPropertyAction showStylesAction = (SetBooleanPropertyAction) context.getBuilder().getMode().getAction("SetBooleanPropertyAction.show_styles_in_tooltip");
final JCommandToggleMenuButton showStylesButton = RibbonActionContributorFactory.createCommandToggleMenuButton(showStylesAction);
showStylesAction.setSelected();
showStylesButton.getActionModel().setSelected(showStylesAction.isSelected());
popupmenu.addMenuButton(showStylesButton);
final AFreeplaneAction modificationAction = context.getBuilder().getMode().getAction("CreationModificationPluginAction");
final JCommandToggleMenuButton modificationButton = RibbonActionContributorFactory.createCommandToggleMenuButton(modificationAction);
modificationAction.setSelected();