To prevent duplicate TreeItems, search not only forward but
also backward while trying to find an equal element as the initial
indexInItems will point to the middle element of three equal (equal by
the comparator) elements after binary search.
Change-Id: I656c9190dc1d33b409b6b2b8b4ff85c9842f98e8
Signed-off-by: Julian Jung <julian.jung@vector.com>
Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/188836
Tested-by: Platform Bot <platform-bot@eclipse.org>
Reviewed-by: Karsten Thoms <karsten.thoms@karakun.com>