Bug 133375 [Viewers] Need access to the element comparer of a tree selection
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/TreeSelection.java
code = code * 17 + paths[i].hashCode();
			}
		}
		return code;
	}
	/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.jface.viewers.ITreeSelection#getPaths()
	 */
	public TreePath[] getPaths() {
		return paths==null ? EMPTY_TREE_PATHS : (TreePath[]) paths.clone();
	}
	
	public TreePath[] getPathsFor(Object element) {
		Object value= element2TreePaths==null ? null : element2TreePaths.get(element);
		if (value == null) {
			return EMPTY_TREE_PATHS;
		} else if (value instanceof TreePath) {
			return new TreePath[] { (TreePath)value };
		} else if (value instanceof List) {
			List l= (List)value;
			return (TreePath[])l.toArray(new TreePath[l.size()]);
		} else {
			Assert.isTrue(false, "Should not happen"); 
			return null;
		}
	}
}