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
* methods on this viewer.
	 * <p>
	 * This method was introduced to support multiple equal elements in a viewer
	 * (@see {@link AbstractTreeViewer}). Multiple equal elements are only
	 * supported if the element map is enabled by calling
	 * {@link #setUseHashlookup(boolean)} and passing <code>true</code>.
	 * </p>
	 * <p>
	 * The default implementation of this method tries first to find the widget
	 * for the given element assuming that it is the viewer's input; this is
	 * done by calling <code>doFindInputItem</code>. If it is not found
	 * there, the widgets are looked up in the internal element map provided
	 * that this feature has been enabled. If the element map is disabled, the
	 * widget is found via <code>doFindInputItem</code>.
	 * </p>
	 * 
	 * @param element
	 *            the element
	 * @return the corresponding widgets
	 * 
	 * @since 3.2
	 */
	protected final Widget[] findItems(Object element) {
		Widget result = doFindInputItem(element);
		if (result != null) {
			return new Widget[] { result };
		}
		
		if (usingElementMap()) {
			Object widgetOrWidgets = elementMap.get(element);