Bug 147530 [DataBinding] Provide event objects for change listeners
Before data binding goes 1.0 it would be wise to provide EventObjects for the following listeners to ensure that the API doesn't preclude future expansion of the values supplied to listeners. Interfaces that would be affected: * IValueChangeListener * IValueChangingListener * IListChangeListener * ISetChangeListener * IMappingChangeListener
bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/ObservableMap.java
*/
	private ListenerList mapChangeListeners = new ListenerList();
	
	protected Map wrappedMap;
	private boolean stale = false;
	
	/**
	 * @param realm 
	 * @param wrappedMap
	 */
	public ObservableMap(Map wrappedMap) {
		this(Realm.getDefault(), wrappedMap);
	}
	/**
	 * @param realm 
	 * @param wrappedMap
	 */
	public ObservableMap(Realm realm, Map wrappedMap) {
		super(realm);
		this.wrappedMap = wrappedMap;
	}
	
	public synchronized void addMapChangeListener(IMapChangeListener listener) {
		mapChangeListeners.add(listener);
	}
	public synchronized void removeMapChangeListener(IMapChangeListener listener) {
		mapChangeListeners.remove(listener);
	}
	protected synchronized boolean hasListeners() {
		return super.hasListeners() || !mapChangeListeners.isEmpty();