Bug 135837 [Viewers] Problems with TreeSelection#equals(..) and StructuredSelection#equals(..)
N20060410-0010 TreeSelection#equals(..) is not symmetric with StructuredSelection#equals(..): - TreeSelection#equals(..) is always false if the argument is not instanceof TreeSelection - StructuredSelection.equals(..) can be true if the argument is a TreeSelection 3 Problems: (1) equals(..) should be symmetric, as defined in Object#equals(..) (2) hashCode() of both classes must return the same if objects are equal (currently, StructuredSelection#hashCode() is not even implemented!) (3) equality is currently only defined for the implementations. Should be defined on interfaces, since clients generally only know about the interface, not the implementation.
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/TreeSelection.java
* Creates a new empty selection. See also the static field
	 * <code>EMPTY</code> which contains an empty selection singleton.
	 * <p>
	 * Note that TreeSelection.EMPTY is not equals() to StructuredViewer.EMPTY.
	 * </p>
	 * 
	 * @see #EMPTY
	 */
	public TreeSelection() {
		super();
	}
	
	/**
	 * Returns the element comparer passed in when the tree selection
	 * has been created or <code>null</code> if no comparer has been
	 * provided.
	 * 
	 * @return the element comparer or <code>null</code>
	 * 
	 * @since 3.2
	 */
	public IElementComparer getElementComparer() {
		if (element2TreePaths == null)
			return null;
		return element2TreePaths.getComparer();
	}
	
	private boolean elementEquals(Object element1, Object element2, boolean useComparer) {
		IElementComparer comparer = getElementComparer();
		if (useComparer && comparer != null) {