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/src/org/eclipse/core/databinding/observable/DecoratingObservable.java
/*******************************************************************************
 * Copyright (c) 2008 Matthew Hall and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Matthew Hall - initial API and implementation (bug 237718)
 *     Matthew Hall - but 246626
 ******************************************************************************/
package org.eclipse.core.databinding.observable;
import org.eclipse.core.internal.databinding.Util;
/**
 * An observable which decorates another observable
 * 
 * @since 1.2
 * 
 */
public class DecoratingObservable extends AbstractObservable implements