insidePreservingSelection was introduced to avoid costly updates of
selection. But the implementation forgot to defer some calls to costly
getSelection().
Note that calls of preservingSelection() can be nested.
Avoiding getSelection() is mandatory to get away from O(n*n) behaviour
on batch updates.
Change-Id: I6ff0995bf51d11fabe98c2bca477ceb8e28ec2ec
Signed-off-by: Joerg Kubitz <jkubitz-eclipse@gmx.de>
Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/186357
Tested-by: Platform Bot <platform-bot@eclipse.org>
Reviewed-by: Mickael Istria <mistria@redhat.com>