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.
Please sign in to leave a comment.
The "parent scope" element comes for the j.m.scopes language, so you need to import that one (Control + L).
Vaclav
Thanks. I imported it as a dependency and not as a language.
My scope works good now.