Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316296 - [Compatibility] Turn WorkbenchActionBuilder into models
Summary: [Compatibility] Turn WorkbenchActionBuilder into models
Status: RESOLVED FIXED
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 1.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.0 RC0   Edit
Assignee: Remy Suen CLA
QA Contact: Paul Webster CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-09 09:56 EDT by Paul Webster CLA
Modified: 2010-06-10 11:01 EDT (History)
2 users (show)

See Also:


Attachments
WorkbenchActionBuilder patch v1 (41.67 KB, patch)
2010-06-10 10:47 EDT, Remy Suen CLA
no flags Details | Diff

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