Bug 126839 [DataBinding] IObservable refactoring
bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/TreeViewerUpdatableTree.java
protected void updateViewer(Runnable runable) {
		if (updatingViewer) {
			viewerRefreshList.add(runable);
			return ;
		}
		
		updatingViewer=true;
		try {			
			runable.run();
		}
		finally {
			updatingViewer=false;
		}
		
		while (!viewerRefreshList.isEmpty()) {
		   Runnable work[] = (Runnable[])viewerRefreshList.toArray(new Runnable[viewerRefreshList.size()]);
		   viewerRefreshList.clear();
		   for (int i = 0; i < work.length; i++) {
			updateViewer(work[i]);
		}		
		}
	}
		
	public int addElement(final Object parentElement, final int index, final Object value) {
		SyncRunnable runnable = new SyncRunnable() {
			public Object run() {
				return new Integer(addElement(parentElement, index, value, true));
			}
		};
		return ((Integer)runnable.run()).intValue();