use of org.eclipse.xtext.resource.ResourceSetReferencingResourceSet in project xtext-core by eclipse.
the class ResourceSetGlobalScopeProvider method getScope.
@Override
protected IScope getScope(Resource resource, boolean ignoreCase, EClass type, Predicate<IEObjectDescription> filter) {
IScope parent = IScope.NULLSCOPE;
if (resource == null || resource.getResourceSet() == null)
return parent;
final ResourceSet resourceSet = resource.getResourceSet();
if (resourceSet instanceof ResourceSetReferencingResourceSet) {
ResourceSetReferencingResourceSet set = (ResourceSetReferencingResourceSet) resourceSet;
Iterable<ResourceSet> referencedSets = Lists.reverse(set.getReferencedResourceSets());
for (ResourceSet referencedSet : referencedSets) {
parent = createScopeWithQualifiedNames(parent, resource, filter, referencedSet, type, ignoreCase);
}
}
return createScopeWithQualifiedNames(parent, resource, filter, resourceSet, type, ignoreCase);
}
Aggregations