Community
Participate
Working Groups
Instead of copying the WorkbenchWindow menu manager code to the model, and then regenerating most of it, we can now link the window MMenu to the MenuManager filled in by the WorkbenchActionBuilder. A compatibility level reconciler can create e4 equivalents for the contribution items we can translate (CommandContributionItems, ActionContributionItems that have a definition id, etc). PW
The MMCs can be placed in the right place in the model but the widgets generated by the menu manager do not because they simply get appended at the end instead of having their desired placement positions honoured.
Created attachment 183128 [details] Workbench window menu management patch v1
Created attachment 183138 [details] Workbench window menu management patch v2
Had a quick look at the patch. Could we look at an in place reconciliation step in WorkbenchWindow? So have org.eclipse.ui.internal.WorkbenchWindow.fill(MMenu, IMenuManager) work similiarly to org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.reconcileManagerToModel(MenuManager, MMenu) with the added abilities to turn CCI, ACIs with definitionIDs, and other MenuManagers into proper model items. Then you don't have to do a removeAll() after that, the rendering will work with Model and Opaque model that we've just created. PW
Created attachment 183221 [details] Workbench window menu management patch v3 The SwitchToWindowMenu isn't showing up properly.
(In reply to comment #5) > The SwitchToWindowMenu isn't showing up properly. First it gets populated. Then the final 'parentManager.update(false)' call in MenuManager's processContents(*) ends up disposing them.
Created attachment 183243 [details] Workbench window menu management patch v4 Things should now look the same as patch v2. This patch includes the removal of the optimization code in SwitchToWindowMenu to workaround the double update problem coming from MenuManager.
Created attachment 183256 [details] Workbench window menu management patch v5
Created attachment 183259 [details] Workbench window menu management patch v6 Forgot to uncomment some stuff I was testing.
Created attachment 183298 [details] Workbench window menu management patch v7
(In reply to comment #10) > Created an attachment (id=183298) [details] > Workbench window menu management patch v7 Patch released to CVS HEAD.