// Fetch the manager of the context menu
ContextMenuManager cmm = ContextMenuManager.getContextMenuManager();
// fetch context menu component
ContextMenuComponent cmc = cell.getComponent(ContextMenuComponent.class);
// show standard menu items?
if (settings.isDisplayStandard() == true) {
// fetch standard items from CMM
List<ContextMenuFactorySPI> factoryList = cmm.getContextMenuFactoryList();
// add each item to the menu
for (ContextMenuFactorySPI factory : factoryList) {
ContextMenuItem items[] = factory.getContextMenuItems(event);
for (ContextMenuItem item : items) {
addContextMenuItem(item, cell);
}
}
}
// show cell-specific standard items?
if (settings.isDisplayCellStandard() && cmc != null) {
// fetch standard factories from CMC
ContextMenuFactorySPI factories[] = cmc.getContextMenuFactories();
// add each item to the menu
for (ContextMenuFactorySPI factory : factories) {
ContextMenuItem items[] = factory.getContextMenuItems(event);
for (ContextMenuItem item : items) {
addContextMenuItem(item, cell);