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

Bug 316296

Summary: [Compatibility] Turn WorkbenchActionBuilder into models
Product: [Eclipse Project] e4 Reporter: Paul Webster <pwebster>
Component: UIAssignee: Remy Suen <remy.suen>
Status: RESOLVED FIXED QA Contact: Paul Webster <pwebster>
Severity: normal    
Priority: P3 CC: bokowski, remy.suen
Version: 1.0   
Target Milestone: 1.0 RC0   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
WorkbenchActionBuilder patch v1 none

Description Paul Webster CLA 2010-06-09 09:56:14 EDT
To get started we created an entire menu structure in the e4xmi.  It's not correct and it also causes the problem when we open a second workbench window (no menu bar).

When we create a WorkbenchWindow we run the WAB to register actions and get handlers.  We can also take the now-filled-in bogus MenuManager and generate a menuBar model.

CommandContributionItem: MHandledMenuItem
ActionContributionItem (w/definitionId): MHandledMenuItem
PluginActionContributionItem (w/definitionId): MHandledMenuItem
GroupMarker/Separator: MMenuSeparator
MenuManager: MMenu

ActionContributionItem(IAction): maybe MDirectMenuItem, or generate a command/handler

CompoundContributionItem: we need to figure out what to do, as this expands in-place to create 3 or 4 new IContributionItems

PW
Comment 1 Remy Suen CLA 2010-06-10 10:47:02 EDT
Created attachment 171641 [details]
WorkbenchActionBuilder patch v1

The patch requires changes to the org.eclipse.platform.

(In reply to comment #0)
> To get started we created an entire menu structure in the e4xmi.  It's not
> correct and it also causes the problem when we open a second workbench window
> (no menu bar).

The second window should now have a menu bar "identical" to the first window.

> ActionContributionItem(IAction): maybe MDirectMenuItem, or generate a
> command/handler

There is only one ACI case, for preferences. It has been swapped for a MHandledMenuItem.

> CompoundContributionItem: we need to figure out what to do, as this expands
> in-place to create 3 or 4 new IContributionItems

See bug 316469 for CompoundContributionItems. This manifests itself in cases like the "new wizard", "show view", "open perspective", "recent files", etc.

See bug 316470 for custom IContributionItem implementations.
Comment 2 Remy Suen CLA 2010-06-10 11:01:31 EDT
The menu bar should now be populated via model elements. Lots of stuff are missing though I expect those to be covered by action sets and external contributions.