Bug 126839 [DataBinding] IObservable refactoring
bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/TreeViewerUpdatableTree.java
}		
		});
		
		this.viewer.setInput(this);
	}
		
	protected TreeNode getTreeNode(Object element) {		
		if (element==null || element==rootKey || element==viewerInput) {
			TreeNode result = (TreeNode) nodes.get(rootKey);
			if (result==null) {
				result = new TreeNode(null);
				nodes.put(rootKey, result);
			}			
			return result;
		}
		return (TreeNode)nodes.get(element);
	}
	
	private int primAddChildElement(List list, Object element, int index) {
		int position;
		if (index < 0 || index > list.size()) {
			position = list.size();
			list.add(element);
		} else {
			list.add(index, element);
			position = index;
		}
		return position;
	}