<handler class="ui.command.DeleteHandler" commandId="org.eclipse.ui.edit.delete"> </handler>
<handler class="<custom handler>" commandId="<standard / existing command id>"> <activeWhen> <with variable="activeContexts"> <iterate ifEmpty="false" operator="or"> <equals value="<custom context name>"> </equals> </iterate> </with> </activeWhen> </handler>
IContextService contextService = (IContextService) PlatformUI.getWorkbench().getService(IContextService.class); contextService.activateContext( <custom context> );