use of org.eclipse.xtext.scoping.impl.SimpleScope in project smarthome by eclipse.
the class PersistenceGlobalScopeProvider method getScope.
@Override
protected IScope getScope(Resource resource, boolean ignoreCase, EClass type, Predicate<IEObjectDescription> predicate) {
IScope parentScope = super.getScope(resource, ignoreCase, type, predicate);
List<IEObjectDescription> descs = new ArrayList<>();
for (EObject eObj : res.getContents()) {
if (eObj instanceof Strategy) {
Strategy strategy = (Strategy) eObj;
descs.add(EObjectDescription.create(strategy.getName(), strategy));
}
}
return new SimpleScope(parentScope, descs);
}
Aggregations