Bug 98242 [Viewers] [Javadoc] clarify that StructuredViewer does not update sort order if null properties are given
Despite the specification of StructuredViewer.update(Object element, String[] properties) that specifiying null properties forces full update including sort order, the implementation in 3.1M6 calls internalUpdate() which inits needsRefilter to false if no properties are given. Thus a change to a relevant sort attribute of the element does not maintain sort order (e.g. on TreeViewer). Suggested fix: protected void internalUpdate(Widget widget, Object element, String[] properties) { boolean needsRefilter = true; if (properties != null) { needsRefilter = false; for (int i = 0; i < properties.length; ++i) { needsRefilter = needsRefilter(element,properties[i]);
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/StructuredViewer.java
*            a viewer sorter, or <code>null</code> if none
	 */
	public void setSorter(ViewerSorter sorter) {
		if (this.sorter != sorter) {
			this.sorter = sorter;
			refresh();
		}
	}
	/**
	 * Sets this viewer's comparator to be used for sorting elements, and triggers refiltering and 
	 * resorting of this viewer's element.  <code>null</code> turns sorting off.
	 * To get the viewer's comparator, call <code>getComparator()</code>.
     * <p>
     * IMPORTANT: This method was introduced in 3.2. If a reference to this viewer object 
     * is passed to clients who call <code>getSorter()<code>, null may be returned from
     * from that method even though the viewer is sorting its elements using the
     * viewer's comparator.
     * </p>
	 * 
	 * @param comparator a viewer comparator, or <code>null</code> if none
     *
     * @since 3.2
	 */
	public void setComparator(ViewerComparator comparator){
		if (this.sorter != comparator){
			this.sorter = comparator;
			refresh();
		}
	}