mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-16 08:48:55 +00:00
[bug 464762] Handle cases where resolve returns a detached proxy itself
Made PortableURIs more robust against EObjects without eResource. Also fixed the cause, which was BatchLinkingService returning proxies instead of null, when something couldn't be resolved. Signed-off-by: Sven Efftinge <sven.efftinge@itemis.de>
This commit is contained in:
parent
8e042ce1a8
commit
2d18d6663e
1 changed files with 1 additions and 1 deletions
|
@ -89,7 +89,7 @@ class PortableURIs {
|
|||
def URI toPortableURI(StorageAwareResource sourceResource, URI targetURI) {
|
||||
val to = sourceResource.resourceSet.getResource(targetURI.trimFragment, false)?.getEObject(targetURI.fragment)
|
||||
// if it points to some registered ecore, there's no resourceSet and the result is not portable
|
||||
if (to == null || to.eResource.resourceSet != null) {
|
||||
if (to == null || to.eResource?.resourceSet != null) {
|
||||
val result = toPortableURI(sourceResource, to);
|
||||
if (result != null) {
|
||||
return result
|
||||
|
|
Loading…
Reference in a new issue