Bug 338559 ui.services has a dependency on SWT
bundles/org.eclipse.e4.ui.services/src/org/eclipse/e4/ui/services/internal/events/EventBroker.java
String[] topics = new String[] {topic};
		Dictionary<String, Object> d = new Hashtable<String, Object>();
		d.put(EventConstants.EVENT_TOPIC, topics);
		if (filter != null)
			d.put(EventConstants.EVENT_FILTER, filter);
		EventHandler wrappedHandler = new UIEventHandler(eventHandler, headless);
		ServiceRegistration registration = bundleContext.registerService(EventHandler.class.getName(), wrappedHandler, d);
		registrations.put(eventHandler, registration);
		return true;
	}
	public boolean unsubscribe(EventHandler eventHandler) {
		ServiceRegistration registration = (ServiceRegistration) registrations.remove(eventHandler);
		if (registration == null)
			return false;
		registration.unregister();
		return true;
	}
	
	@PreDestroy
	void dispose() {
		Collection<ServiceRegistration> values = registrations.values();
		ServiceRegistration[] array = values.toArray(new ServiceRegistration[values.size()]);
		registrations.clear();
		for (int i = 0; i < array.length; i++) {
			
			array[i].unregister();
		}
	}
}