final ShowNotesInMapAction showNotesInMapAction = (ShowNotesInMapAction) context.getBuilder().getMode().getAction("ShowNotesInMapAction");
final JCommandToggleMenuButton showNotedsInMapButton = RibbonActionContributorFactory.createCommandToggleMenuButton(showNotesInMapAction);
showNotesInMapAction.setSelected();
showNotedsInMapButton.getActionModel().setSelected(showNotesInMapAction.isSelected());
popupmenu.addMenuButton(showNotedsInMapButton);
final SetBooleanMapPropertyAction showIconAction = (SetBooleanMapPropertyAction) context.getBuilder().getMode().getAction("SetBooleanMapPropertyAction.show_note_icons");
final JCommandToggleMenuButton toggleButton = RibbonActionContributorFactory.createCommandToggleMenuButton(showIconAction);
showIconAction.setSelected();
toggleButton.getActionModel().setSelected(showIconAction.isSelected());