I contributed a toggle-style toolbar contribution to my view in my RCP. Now, i want to know how to set the button's state (since it's a toggle button) from my view. Or, at least, how to initialize it's state after the view is loaded (the toggle state can vary, its not static)
I tried to call from my view: getViewSite().getActionBars().getMenuManager().getItems() (returns an array of IContributionElements), which i iterated over and looked for the id. but the array only contains the models of the buttons, and there is no possibility to change the selection through these objects.
Help!!