ContextualMenuFactory factory = createContextualMenuFactory();
factory.addItem(GrammarWindowMenu.MI_GROUP_RULE);
factory.addItem(GrammarWindowMenu.MI_UNGROUP_RULE);
factory.addSeparator();
XJMenuItemCheck item = (XJMenuItemCheck) factory.addItem(GrammarWindowMenu.MI_IGNORE_RULE);
item.setSelected(editorRules.getFirstSelectedRuleIgnoredFlag());
return factory.menu;
}