Bug 159190 [Viewers] multiple dispose listeners for elements in VIRTUAL tree viewer
3.3 Each time an element is mapped in a VIRTUAL tree viewer, a dispose listener is hooked to its item to properly unmap it. However, elements are mapped to the same item more than once (each time it is updated via doUpdateItem(Widget widget, Object element, boolean fullMap)). This results in many dispose listeners for each element to unmap it, which is a potential performance issue. The debugger subclasses the tree viewer and updates (clears) filtered children when an element is unmapped. It ends up doing the operation many times (once for each dispose callback), instead of once.
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/TreeViewer.java
* sorter, and no filters.
	 * 
	 * @param parent
	 *            the parent control
	 * @param style
	 *            the SWT style bits used to create the tree.
	 */
	public TreeViewer(Composite parent, int style) {
		this(new Tree(parent, style));
	}
	/**
	 * Creates a tree viewer on the given tree control. The viewer has no input,
	 * no content provider, a default label provider, no sorter, and no filters.
	 * 
	 * @param tree
	 *            the tree control
	 */
	public TreeViewer(Tree tree) {
		super();
		this.tree = tree;
		hookControl(tree);
		treeEditor = new TreeEditor(tree);
		initTreeViewerImpl();
	}
	/*
	 * (non-Javadoc) Method declared in AbstractTreeViewer.
	 */
	protected void addTreeListener(Control c, TreeListener listener) {
		((Tree) c).addTreeListener(listener);
	}