Hi,
I'm try to add a ToolBar inside a e4 view using a ToolBarManager and commands that look like this:

I create the ToolBar like this:
ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT);
// CommandFactory just create CommandContributionItem with the provided ID
toolBarManager.add(CommandFactory.makeCommandItem(IWorkbenchCommandConstants.EDIT_DELETE, CommandFactory.STYLE_PUSH));
toolBarManager.add(CommandFactory.makeCommandItem(FlowConstants.ID_COMMAND_ADD_PROPERTY, CommandFactory.STYLE_PUSH));
inputToolbar = toolBarManager.createControl(tab);
The ToolBar appears and the commands work but the problem is that the buttons of the ToolBar are not updated with the selection (enabled/disabled state). They are only updated when the popup context menu of the table appears (which is using the same commands).
To register the popup context menu of the table I use the injected EMenuService:
menuService.registerContextMenu(viewer.getControl(), menuId);
It works great for popup context menu, is there a similar service for populating and registering ToolBars?