Bug 127861 [DataBinding] Mark API provisional
bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/UpdatableTreeContentProvider.java
ValueTreeNode result = (ValueTreeNode)mapElementToValueTreeNode.get(key);
                    result.dispose();
                }
            } finally {
                avoidViewerUpdates--;
            }
        }
    }
    public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
        
        setViewer(viewer);
        
        if (oldInput != null && newInput != null && oldInput.equals(newInput)) {
            return;
        }
        
        inputElement = newInput;
        try {
            avoidViewerUpdates++;
            pruneSubtree(null, oldInput);
        } finally {
            avoidViewerUpdates--;
        }
    }
    private void setViewer(Viewer viewer) {
        if (!(viewer instanceof TreeViewer)) {
            throw new IllegalArgumentException("This content provider can only be used with TreeViewers"); 
        }
        TreeViewer newTreeViewer = (TreeViewer) viewer;