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
}
	/**
	 * The <code>StructuredViewer</code> implementation of this
	 * <code>ContentViewer</code> method calls <code>update</code> if the
	 * event specifies that the label of a given element has changed, otherwise
	 * it calls super. Subclasses may reimplement or extend.
	 * </p>
	 * @param event the event that generated this update
	 */
	protected void handleLabelProviderChanged(LabelProviderChangedEvent event) {
		Object[] elements = event.getElements();
		if (elements != null) {
			update(elements, null);
		} else {
			super.handleLabelProviderChanged(event);
		}
	}
	/**
	 * Handles a select event from the widget.
	 * <p>
	 * This method is internal to the framework; subclassers should not call
	 * this method.
	 * </p>
	 * 
	 * @param event
	 *            the SWT selection event
	 */
	protected void handleSelect(SelectionEvent event) {
		
		Control control = getControl();