if (delegate instanceof IWorkbenchWindowActionDelegate) {
final IWorkbenchWindowActionDelegate workbenchWindowDelegate = (IWorkbenchWindowActionDelegate) delegate;
workbenchWindowDelegate.dispose();
} else if (delegate instanceof IActionDelegate2) {
final IActionDelegate2 delegate2 = (IActionDelegate2) delegate;
delegate2.dispose();
}
}
public final Object execute(final ExecutionEvent event) {
final IAction action = getAction();