I have to program some Dialogs in Jface with two mein functionalities.
  • Search
  • Select an Item

Hence it would be nice if the default Button/Action would be the SearchAction. After pressing the Search Button the new default Button shoud be "OK" of the Dialog.

Up to now I only found to set the default Button during creation of the Dialog Buttons and the shell.setDefaultButton(Button ..).

But this does not allow me to set an Action/ActionContributionItem to be the default Button.

Is there a way to achieve this?

Thanks in advance and greets,