Bug 211646 [JFace] StructuredSelection.toList(...) allows modification to original selection
3.4 The implementation of StructuredSelection.toList() looks like this: "return Arrays.asList(elements == null ? new Object[0] : elements);" This returns a list with the actual underlying array of selected elements. Changes to the list returned by this method write through to the underlying array and change the original selection. I don't think this is intentional?
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/IStructuredSelection.java
*
     * @return an element, or <code>null</code> if none
     */
    public Object getFirstElement();
    /**
     * Returns an iterator over the elements of this selection.
     *
     * @return an iterator over the selected elements
     */
    public Iterator iterator();
    /**
     * Returns the number of elements selected in this selection.
     *
     * @return the number of elements selected
     */
    public int size();
    /**
     * Returns the elements in this selection as an array.
     *
     * @return the selected elements as an array
     */
    public Object[] toArray();
    /**
     * Returns the elements in this selection as a <code>List</code>.
     *
     * @return the selected elements as a list
     */
    public List toList();
}