Bug 126839 [DataBinding] IObservable refactoring
bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/beans/JavaBeansUpdatableCellProvider.java
private final String[] propertyNames;
	public JavaBeansUpdatableCellProvider(IReadableSet readableSet, String[] propertyNames) {
		this.readableSet = readableSet;
		this.propertyNames = propertyNames;
		readableSet.addChangeListener(listener);
		for (Iterator it = readableSet.toCollection().iterator(); it.hasNext();) {
			addBeansListenerTo(it.next());
		}
	}
	
	private IChangeListener listener = new IChangeListener() {
		public void handleChange(ChangeEvent changeEvent) {
			if (changeEvent.getChangeType() == ChangeEvent.ADD_MANY) {
				Collection added = (Collection)changeEvent.getNewValue();
				
				for (Iterator iter = added.iterator(); iter.hasNext();) {
					Object element = iter.next();
					
					addBeansListenerTo(element);
				}
			} else if (changeEvent.getChangeType() == ChangeEvent.REMOVE_MANY) {
				Collection removed = (Collection)changeEvent.getNewValue();
				
				for (Iterator iter = removed.iterator(); iter.hasNext();) {
					Object element = iter.next();
					
					removeBeansListenerFrom(element);
				}				
			}
		}