Bug 24521 [Viewers] TreeViewer.update() does not work correctly with filter
When I add an element which does not satisfy the filtering condition and then update it so that it does, call to update does not show the element. This is because[StructuredViewer.update]: public void update(Object element, String[] properties) { Assert.isNotNull(element); | Widget item = findItem(element); | if (item == null) | return; the code silently ignores that the element may become visible... btw. later in code of this method: if (needsRefilter) { refresh(); return; } This is quite inefficient, as it needs to query all visible items; however only one element may actually change (change visibility and/or sort order).
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/StructuredViewer.java
* 
	 * @param element
	 *            the element
	 * @return the corresponding widget, or <code>null</code> if none
	 */
	protected final Widget findItem(Object element) {
		Widget[] result = findItems(element);
		return result.length == 0 ? null : result[0];
	}
	/**
	 * Finds the widgets which represent the given element. The returned array
	 * must not be changed by clients; it might change upon calling other
	 * 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