I have a part with an MToolBar. I want to add to it a widget that isn't a button (let say a spinner, but it can be anything).
So far I created buttons for it by using MMenuFactory.INSTANCE.createDirectToolItem().
How can I add a widget though???
I see I can add a tool control but I am not sure how to use this option...
My problem is that I am trying to add it to a toolbar of a dynamic part inside of my window, thus the xmi used in the tutorial is no good.
So I am writing the following code:
//create the toolbar programmatically
MToolBar toolbar = MMenuFactory.INSTANCE.createToolBar();
MToolControl button = MMenuFactory.INSTANCE.createToolControl();
button.setContributorURI("bundleclass://org.eclipse.swt.widgets.Button"); //I use button just of example in the forum
I tried variations of the is code, like setting contribution URI and not writing "bundleclass"... nothing worked