Bug 255734 [DataBinding] DecoratingObservable should self-dispose when the decorated observable is disposed
DecoratingObservable should dispose itself in response to the disposal of its decorated observable. One thing we'll have to address is that all existing observables may call firstListenerAdded() / lastListenerRemoved() in response to an addDisposeListener() / removeDisposeListener() call. We should try to eliminate this case to avoid hooking listeners when all we're interested in is disposal.
bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/DecoratingObservable.java
ObservableTracker.getterCalled(this);
	}
	protected void firstListenerAdded() {
		if (staleListener == null) {
			staleListener = new IStaleListener() {
				public void handleStale(StaleEvent staleEvent) {
					DecoratingObservable.this.handleStaleEvent(staleEvent);
				}
			};
		}
		decorated.addStaleListener(staleListener);
	}
	protected void lastListenerRemoved() {
		if (staleListener != null) {
			decorated.removeStaleListener(staleListener);
			staleListener = null;
		}
	}
	/**
	 * Called whenever a StaleEvent is received from the decorated observable.
	 * By default, this method fires the stale event again, with the decorating
	 * observable as the event source. Subclasses may override to provide
	 * different behavior.
	 * 
	 * @param event
	 *            the stale event received from the decorated observable
	 */
	protected void handleStaleEvent(StaleEvent event) {
		fireStale();
	}