Bug 575641 - Text editor fails to open for very large text files

This change adds a catch for OutOfMemoryError to setDocumentContent() in
ResourceTextFileBuffer, FileStoreTextFileBuffer and
LastSaveReferenceProvider. The OOM is wrapped in an IOException and is
rethrown as a CoreException, relying on the CoreException handling
further up in the call stack trace.

Change-Id: I1ad32be1c1733106c3516c5914ab7784fcc57972
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.text/+/184513
Tested-by: Andrey Loskutov <loskutov@gmx.de>
Tested-by: Platform Bot <platform-bot@eclipse.org>
Reviewed-by: Jörg Kubitz <jkubitz-eclipse@gmx.de>
Reviewed-by: Andrey Loskutov <loskutov@gmx.de>
5 files changed