I need a Button build from an IAction. Should I do that myself or is there already something in JFace which I can reuse? Note, I need the button instance, because I want to make it the default button in a dialog.
With new ActionContributionItem(action).fill(parent); I don’t seem to be able to get the button instance.
After
fill(parent)I think you can call parent.getChildren(). I expect the new button will be the last entry in the returned Control[]. Therefore:If it’s not stuck on the end, you’ll have to get the list list of children before and after, and find the new entry… but it’ll almost certainly be tacked on the end.