Bug 100565 [Viewers] Tree viewer selection not revealed if unchanged
[RC3] Steps: 1. Check out org.eclipse.ui.workbench 2. Open Workbench.java 3. Ctrl-O to open Quick Outline 4. Type "r", note that the field "runEventLoop" is the first match 5. Type "u", note that the field is not shown anymore 6. Type arrow-down key, note that you cannot see the selected entry
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/AbstractTreeViewer.java
*           non-negative level, or <code>ALL_LEVELS</code> to collapse
     *           all levels of the tree
     */
    protected void internalCollapseToLevel(Widget widget, int level) {
        if (level == ALL_LEVELS || level > 0) {
            if (widget instanceof Item)
                setExpanded((Item) widget, false);
            if (level == ALL_LEVELS || level > 1) {
                Item[] children = getChildren(widget);
                if (children != null) {
                    int nextLevel = (level == ALL_LEVELS ? ALL_LEVELS
                            : level - 1);
                    for (int i = 0; i < children.length; i++)
                        internalCollapseToLevel(children[i], nextLevel);
                }
            }
        }
    }
    /**
     * Recursively collects all expanded elements from the given widget.
     * 
     * @param result
     *           a list (element type: <code>Object</code>) into which to
     *           collect the elements
     * @param widget
     *           the widget
     */
    private void internalCollectExpanded(List result, Widget widget) {
        Item[] items = getChildren(widget);
        for (int i = 0; i < items.length; i++) {