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
Control control = getControl();
		if (control == null || control.isDisposed()) {
			return;
		}
		if (!inChange) {
			setSelectionToWidget(selection, reveal);
			ISelection sel = getSelection();
			updateSelection(sel);
			firePostSelectionChanged(new SelectionChangedEvent(this, sel));
		} else {
			restoreSelection = false;
			setSelectionToWidget(selection, reveal);
		}
	}
	/**
	 * Parlays the given list of selected elements into selections on this
	 * viewer's control.
	 * <p>
	 * Subclasses should override to set their selection based on the given list
	 * of elements.
	 * </p>
	 * 
	 * @param l
	 *            list of selected elements (element type: <code>Object</code>)
	 *            or <code>null</code> if the selection is to be cleared
	 * @param reveal
	 *            <code>true</code> if the selection is to be made visible,
	 *            and <code>false</code> otherwise
	 */
	protected abstract void setSelectionToWidget(List l, boolean reveal);