[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: Question about ActionContributionItem

It's specifically designed that way.

A MenuManager and its associated IContributionItems are the "model" that backs one specific Menu and its MenuItems. If you are only writing JFace+SWT, you will need to create a MenuManager per SWT Menu you need to create. You can put the same IActions in multiple MenuManagers, but an ActionContributionItem must belong to one MenuManager (unless it's a dropdown, then it won't work).

That's why eclipse then adds extensions on top of the JFace support. i.e. org.eclipse.ui.menus or org.eclipse.ui.popupMenus allows you to declaratively contribute the same menu structures to multiple context menus.

Later,
PW


-- Paul Webster http://wiki.eclipse.org/Platform_Command_Framework http://wiki.eclipse.org/Command_Core_Expressions http://wiki.eclipse.org/Menu_Contributions http://wiki.eclipse.org/Menus_Extension_Mapping http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/workbench.htm