Eclipse RCP obtain toolbar contributions programmatically
问题 I have an RCP application and I want disable/enable some elements of the toolbar when I perform some actions. My extension: <extension point="org.eclipse.ui.menus"> <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar"> <toolbar id="vendor.toolbar1h"> <command commandId="vendor.commands.MyCommand" icon="icon.png" id="MyButtonID1" style="toggle"> </command> </toolbar> </menuContribution> </extension> I try to enumerate all the toolbar contributions with this code, but it doesn't