Filtering a parent scope

I'm using MPS 2017.2.2. 

I'm implementing a scope provider and want to get a reference to the parent scope. But the "parent scope" construct does not come up when I type it.  I imported the model jetbrains.mps.scope.

I'm doing this:

public Scope getScope(concept<> kind, node<> child)

   overrides ScopeProvider.getScope {

   if(kind.isSubConceptOf(ISignal)) { return new FilteringByConceptScope(parent scope, concept/IWritableSignal/); }

   return parent scope

}

I want to filter the parent scope such that only the IWritableSignal concept are shown.

 

 

0
3 comments

The "parent scope" element comes for the j.m.scopes language, so you need to import that one (Control + L).

Vaclav

 

0

Thanks. I imported it as a dependency and not as a language.

0

My scope works good now.

0

Please sign in to leave a comment.