use of org.eclipse.xtext.scoping.impl.ImportScope in project statecharts by Yakindu.
the class STextScopeProvider method scope_ActiveStateReferenceExpression_value.
public IScope scope_ActiveStateReferenceExpression_value(EObject context, EReference reference) {
Statechart statechart = getStatechart(context);
if (statechart == null)
return IScope.NULLSCOPE;
List<State> allStates = EcoreUtil2.getAllContentsOfType(statechart, State.class);
IScope scope = Scopes.scopeFor(allStates, nameProvider, IScope.NULLSCOPE);
return new ImportScope(getActiveStateNormalizer(context), scope, new EObjectDescriptionLookUp(Lists.newArrayList(scope.getAllElements())), reference.getEReferenceType(), false);
}
Aggregations