Bug 261852 [context] Separate code into API / SPI / internal
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/workbench/ui/renderers/swt/SWTPartFactory.java
}
		Control control = display.getFocusControl();
		while (control != null && h == null) {
			Context l = (Context) control.getData("LOCATOR");
			if (l != null) {
				IHandlerService hs = (IHandlerService) l
						.get(IHandlerService.class.getName());
				if (hs != null) {
					h = hs.getHandler(command);
				}
			}
			control = control.getParent();
		}
		return h;
	}
	private void createToolBarItem(ToolBar swtMenu,
			final org.eclipse.e4.ui.model.application.ToolBarItem toolBarItem) {
		int style = SWT.PUSH;
		final ToolItem newToolItem = new ToolItem(swtMenu, style);
		newToolItem.setText(toolBarItem.getName());
		newToolItem.setToolTipText(toolBarItem.getTooltip());
		newToolItem.setImage(getImage(toolBarItem));
		if (toolBarItem.getCommand() != null) {
			final ISelectionService selectionService = (ISelectionService) context
				.get(ISelectionService.class.getName());
			newToolItem.addListener(SWT.Selection, new Listener() {
				public void handleEvent(Event event) {
					Object result = canExecuteItem(context, newToolItem
							.getDisplay(), toolBarItem, selectionService);
					if (Boolean.TRUE.equals(result)) {