Search in sources :

Example 1 with EObjectDescriptionLookUp

use of org.eclipse.xtext.resource.impl.EObjectDescriptionLookUp in project xtext-xtend by eclipse.

the class XtendResourceDescription method getLookUp.

@Override
protected EObjectDescriptionLookUp getLookUp() {
    if ((this.lookup == null)) {
        List<IEObjectDescription> _computeExportedObjects = this.computeExportedObjects();
        EObjectDescriptionLookUp _eObjectDescriptionLookUp = new EObjectDescriptionLookUp(_computeExportedObjects);
        this.lookup = _eObjectDescriptionLookUp;
    }
    return this.lookup;
}
Also used : EObjectDescriptionLookUp(org.eclipse.xtext.resource.impl.EObjectDescriptionLookUp) IEObjectDescription(org.eclipse.xtext.resource.IEObjectDescription)

Example 2 with EObjectDescriptionLookUp

use of org.eclipse.xtext.resource.impl.EObjectDescriptionLookUp 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);
}
Also used : EObjectDescriptionLookUp(org.eclipse.xtext.resource.impl.EObjectDescriptionLookUp) State(org.yakindu.sct.model.sgraph.State) ImportScope(org.eclipse.xtext.scoping.impl.ImportScope) Statechart(org.yakindu.sct.model.sgraph.Statechart) IScope(org.eclipse.xtext.scoping.IScope)

Aggregations

EObjectDescriptionLookUp (org.eclipse.xtext.resource.impl.EObjectDescriptionLookUp)2 IEObjectDescription (org.eclipse.xtext.resource.IEObjectDescription)1 IScope (org.eclipse.xtext.scoping.IScope)1 ImportScope (org.eclipse.xtext.scoping.impl.ImportScope)1 State (org.yakindu.sct.model.sgraph.State)1 Statechart (org.yakindu.sct.model.sgraph.Statechart)1