Cannot reproduce Calculator tutorial on MPS 2018.2.5 (getScope not appearing)

Dear all,

  I am trying to reproduce the Calculator tutorial and everything proceeded smoothly until I wanted to refine the scope for InputFieldReference. As described in the tutorial here the Calculator concept should have a behaviour overriding the Scope definition. When I try to create the overriding method for getScope it does not appear in the list of available methods. If I try to add as suggested jetbrains.mps.scope it is not found (I get j.m.baseLanguage.scopes and j.m.lang.scopes). I have also tried to add in several places j.m.baseLanguage and j.m.smodel in dependencies and used languages but still cannot get the method to be overridden (nor I can get j.m.scope in the list when adding a new language for the behaviour definition).

Did I miss something?



Comment actions Permalink

Hi Antonio,


I suspect your Calculator concept does not implement the ScopeProvider interface concept and such cannot override methods from ScopeProvider.

I'm referring to this text from the tutorial:

"Once we have specified that the scope for InputFieldReference when searching for an InputField is inherited, we must indicate that Calculator is a ScopeProvider. This ensures that Calculator will have say in building the scope for all InputFieldReferencesthat are placed as its descendants."



Comment actions Permalink

Hi Vaclav,

  thanks for the prompt feedback! Indeed I missed the inclusion of ScopeProvider in the implemented interfaces.

Now I can get the getScope in the overridable methods and continue with the tutorial!

Thanks again,



Please sign in to leave a comment.