Bug 578725 - improve workspace.prepareOperation/endOperation pairs

if subMonitor.newChild throws a unchecked RuntimeException then the
"prepareOperation" would not be executed but "endOperation" which would
cause
IllegalArgumentException: endRule without matching beginRule

Change-Id: Iab9d828db8402cefedde29aff3fd08e5783d4e62
Signed-off-by: Joerg Kubitz <jkubitz-eclipse@gmx.de>
Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.resources/+/190762
Tested-by: Andrey Loskutov <loskutov@gmx.de>
Reviewed-by: Andrey Loskutov <loskutov@gmx.de>
4 files changed