Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 316470

Summary: [Contributions] [Compatibility] e4 story for dealing with custom IContributionItem implementations
Product: [Eclipse Project] Platform Reporter: Remy Suen <remy.suen>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, emoffatt, pwebster, rolf.theunissen
Version: 4.1   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 308573, 317190, 317204    

Description Remy Suen CLA 2010-06-10 10:20:21 EDT
These items can do a variety of things when the fill(*) methods are called. We are going to need to wire them up with the model/renderer.
Comment 1 Eric Moffatt CLA 2010-06-10 15:08:48 EDT
Can you give an example? I thought most of this would be handled just be deferring to the MenuManager/ToolbarManager's 'fill'...
Comment 2 Paul Webster CLA 2010-06-10 15:22:09 EDT
For compat registerContextMenus and currently for view menus we defer programmatic and certain legacy action extension to the MenuManager/ToolBarManager.

But o.e.ui.menus is done from e4 MenuContributions and for the main menu and main toolbar (formerly known as the main coolbar) we both have to process o.e.ui.menus submissions that are some subclass of ContributionItem and deal with a few custom ContributionItems provided from WorkenchActionBuilder.

PW
Comment 3 Eric Moffatt CLA 2010-06-18 10:18:30 EDT
I think that this is the right approach...rather than fighting the fact that the legacy menus/tbs are managed in a completely different manner than normal  'modeled' ones we should consider just writing custom renderers for them (including the main menu?).
Comment 4 Paul Webster CLA 2010-06-18 10:42:55 EDT
If we provide an MRenderedContributionItem we can insert it into the appropriate model and have it rendered later ... it would need to co-operate with the MenuItemRenderer subclasses, since they calculate an index into their parent based on the visible model elements ... but an MRCI provides 0-n SWT MenuItems.

PW