Bug 153503 [Viewers] ComboViewer#setSelection does't select element w/o equals override
I use a ComboViewer to show elements of a class that does not override Object#equals and #hashCode. Therefore I specified an IElementComparer via ComboViewer#setComparer to do the job. My expectation was that the comparer would be used in setSelection to find the element to be selected. Apparently this is not the case. To me this looks like a bug, or is this behaviour desired? The attached test case reproduces this behaviour.
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/AbstractListViewer.java
* Method declared on StructuredViewer.
     */
    protected void setSelectionToWidget(List in, boolean reveal) {
        if (in == null || in.size() == 0) { 
            listDeselectAll();
        } else {
            int n = in.size();
            int[] ixs = new int[n];
            int count = 0;
            for (int i = 0; i < n; ++i) {
                Object el = in.get(i);
                int ix = listMap.indexOf(el);
                if (ix >= 0) {
					ixs[count++] = ix;
				}
            }
            if (count < n) {
                System.arraycopy(ixs, 0, ixs = new int[count], 0, count);
            }
            listSetSelection(ixs);
            if (reveal) {
                listShowSelection();
            }
        }
    }
    int getElementIndex(Object element) {
        return listMap.indexOf(element);
    }
}