Bug 319011 NPE when closing editor after closing a perspective
bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/PartRenderingEngine.java
if (eventBroker != null) {
			eventBroker.subscribe(UIEvents.buildTopic(UIEvents.UIElement.TOPIC,
					UIEvents.UIElement.TOBERENDERED), toBeRenderedHandler);
			eventBroker.subscribe(UIEvents.buildTopic(
					UIEvents.ElementContainer.TOPIC,
					UIEvents.ElementContainer.CHILDREN), childrenHandler);
			eventBroker.subscribe(UIEvents.buildTopic(
					UIEvents.TrimmedWindow.TOPIC,
					UIEvents.TrimmedWindow.TRIMBARS), trimHandler);
		}
	}
	@PreDestroy
	void contextDisposed() {
		if (eventBroker == null)
			return;
		eventBroker.unsubscribe(toBeRenderedHandler);
		eventBroker.unsubscribe(childrenHandler);
		eventBroker.unsubscribe(trimHandler);
	}
	private static void populateModelInterfaces(MContext contextModel,
			IEclipseContext context, Class<?>[] interfaces) {
		for (Class<?> intf : interfaces) {
			Activator.trace(Policy.DEBUG_CONTEXTS,
					"Adding " + intf.getName() + " for " 
							+ contextModel.getClass().getName(), null);
			context.set(intf.getName(), contextModel);
			populateModelInterfaces(contextModel, context, intf.getInterfaces());
		}
	}
	private String getContextName(MUIElement element) {