Bug 575242 - fix elementsChanged() to not refresh viewer too much

Don't refresh viewer on every changed element, that makes UI completely
unresponsible if there are too many search matches. Instead, refresh
viewer only once - either if only one element changed, on concrete
element, or after all elements are updated in elementsChanged().

That reduces ~10 minutes wait time to a second.

Change-Id: I04e6c64cc3319cd5416f4b512d983e76cb081946
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.text/+/183701
Tested-by: Platform Bot <platform-bot@eclipse.org>
Reviewed-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
1 file changed