Bug 316470 - [Contributions] [Compatibility] e4 story for dealing with custom IContributionItem implementations
Summary: [Contributions] [Compatibility] e4 story for dealing with custom IContributio...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 308573 317190 317204
  Show dependency tree
 
Reported: 2010-06-10 10:20 EDT by Remy Suen CLA
Modified: 2020-01-06 16:03 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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