Bug 576425 - Support locations outside a local file system

Support locations outside a local file system by calling
buffer.getContentType().

For remote resources, the location of the buffer is null, thus the
retrieval of its last segment throws a NPE. The code is improved to
avoid the NPE.

Signed-off-by: Rubén Porras Campo <pcr@avaloq.com>
Change-Id: Id704542fe231f9517a47d9fdb6c076ed77bfa77d
Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.text/+/186762
Tested-by: Platform Bot <platform-bot@eclipse.org>
Reviewed-by: Mickael Istria <mistria@redhat.com>
1 file changed