Community
Participate
Working Groups
Actions can be associated with Menu items , and tool bar items using MenuManager and ToolBarManager but there is not way to associate Action with a regular button and obtaining a reference to that button the closest thing is creating an ActionContributionItem with the desired action in its constructor , then filling the parent composite with ActionContributionItem.fill(Control parent) this creats the button , but it doesn't return a reference to that button , so for example i can't give it any layout data i suggest the ActionContributionItem.fill(Control parent) returns the created widget
Moving Dougs bugs
Assigning to component owner PW
Changing the IContributionItem API seems like a bad idea. The same result could be achieved by adding a getWidget() method to ActionContributionItem. This would have a minimal impact on other consumers and would be in line with other methods available on this class. /** * Returns the widget associated with this contribution item. * * @return the widget */ public Widget getWidget() { return widget; }
Fixed in HEAD >20071130 PW
In I20071211-0010 PW