mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-16 08:48:55 +00:00
[grammar][codeassist] Reworked feature proposals
This commit is contained in:
parent
e5fbedbc9e
commit
0791813424
1 changed files with 5 additions and 1 deletions
|
@ -10,6 +10,7 @@ package org.eclipse.xtext.resource;
|
|||
import org.eclipse.emf.common.util.URI;
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
import org.eclipse.emf.ecore.InternalEObject;
|
||||
import org.eclipse.emf.ecore.resource.Resource;
|
||||
|
||||
import com.google.inject.ImplementedBy;
|
||||
import com.google.inject.Inject;
|
||||
|
@ -56,8 +57,11 @@ public interface IGlobalServiceProvider {
|
|||
if (eObject.eIsProxy()) {
|
||||
return findService(((InternalEObject)eObject).eProxyURI(),serviceClazz);
|
||||
} else {
|
||||
return findService(eObject.eResource().getURI(),serviceClazz);
|
||||
Resource eResource = eObject.eResource();
|
||||
if(eResource != null)
|
||||
return findService(eResource.getURI(),serviceClazz);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue