LppEdd
LppEdd

Reputation: 21114

Eclipse RCP - active dialog from command handler

I've registered a key binding in the org.eclipse.ui.contexts.dialogAndWindow context.
I've then associated a command handler

public class QuickActionsHandler extends AbstractHandler {
  @Override
  public Object execute(final ExecutionEvent event) throws ExecutionException {
     ...

Now, how do I get the active Dialog view part from the ExecutionEvent?

Upvotes: 0

Views: 159

Answers (1)

greg-449
greg-449

Reputation: 111142

Dialogs are not view parts - they are generally just windows extending org.eclipse.jface.dialogs.Dialog

Probably the best you can do is get the currently active Shell:

Shell shell = HandlerUtil.getActiveShell(event);

Upvotes: 1

Related Questions