I have a SWT.VIRTUAL (Checked)TreeViewer and stepped into the situation mentioned in the site note of the JavaDocs of method
NOTE #updateElement(int index) can be used to determine selection values. If TableViewer#replace(Object, int) is not called before returning from this method, selections may have missing or stale elements. In this situation it is suggested that the selection is asked for again after replace() has been called.
I do not understand what is meant with "... that the selection is asked for again after replace() has been called".
The situation is this: select the first entry in the tree, press and hold down the SHIFT key, then quickly scroll down to the bottom of the tree to select the last entry.
Now, the observation is that the tree's selection count does not match that of the tree viewer's selection, i.e. inconsistent selection size between SWT's Tree and the TreeViewer.