Bug 122756 [Viewers] Support for TreePath based content providers
Now that the JFace tree viewer supports the notion of a tree path, it would be benefitial if this information was made available to content providers and label providers. The particular scenario that requires this is team views that include change sets. A view can display multiple change sets and a single model element may be included in multiple change sets. In 3.2, we are using the common navigator framework to allow model providers to display their models in a team operation. Having a tree path based content provider would allow the logical model display to be intermixed with change sets. Without this support, team providers would most likely need to support two views, one which shows resources and change sets and another that shows the effects of the operation on the logical model.
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/AbstractTreeViewer.java
if (compare < 0)
                min = mid + 1;
            else
                max = mid - 1;
        }
        return min;
    }
    /**
     * Adds the given child element to this viewer as a child of the given
     * parent element. If this viewer does not have a sorter, the element is
     * added at the end of the parent's list of children; otherwise, the
     * element is inserted at the appropriate position.
     * <p>
     * This method should be called (by the content provider) when a single
     * element has been added to the model, in order to cause the viewer to
     * accurately reflect the model. This method only affects the viewer, not
     * the model. Note that there is another method for efficiently processing
     * the simultaneous addition of multiple elements.
     * </p>
     * 
     * @param parentElement
     *           the parent element
     * @param childElement
     *           the child element
     */
    public void add(Object parentElement, Object childElement) {
        add(parentElement, new Object[] { childElement });
    }
    /**
     * Adds the given SWT selection listener to the given SWT control.