use of org.eclipse.scout.rt.client.ui.action.menu.root.IValueFieldContextMenu in project scout.rt by eclipse.
the class AbstractValueField method initConfig.
@Override
protected void initConfig() {
super.initConfig();
m_listeningSlaves = new EventListenerList();
setAutoAddDefaultMenus(getConfiguredAutoAddDefaultMenus());
// menus
List<Class<? extends IMenu>> declaredMenus = getDeclaredMenus();
List<IMenu> contributedMenus = m_contributionHolder.getContributionsByClass(IMenu.class);
OrderedCollection<IMenu> menus = new OrderedCollection<IMenu>();
for (Class<? extends IMenu> menuClazz : declaredMenus) {
menus.addOrdered(ConfigurationUtility.newInnerInstance(this, menuClazz));
}
menus.addAllOrdered(contributedMenus);
try {
injectMenusInternal(menus);
} catch (Exception e) {
LOG.error("error occured while dynamically contributing menus.", e);
}
new MoveActionNodesHandler<IMenu>(menus).moveModelObjects();
// set container on menus
IValueFieldContextMenu contextMenu = createContextMenu(menus);
contextMenu.setContainerInternal(this);
setContextMenu(contextMenu);
setStatusMenuMappings(createStatusMenuMappings());
}
Aggregations