Calculator tutorial --- MPS 3.0 breaking changes
I'm watching a video tutorial on constraints and type-system in Calculator language. It seems MPS 3.0 introduces some breaking changes so that scope resolution no longer works when coded in a way shown. Precisely you cannot access InputFields names in code completion. Please correct my statement and show me my mistake or provide me with the closest approach to program scope resolution to the shown one :)
TutorialCalculator.zip (128KB)
TutorialCalculator.zip (128KB)
Please sign in to leave a comment.
overrides ScopeProvider.getScope {
if (kind.isSubConceptOf(InputField)) { return SimpleRoleScope.forNamedElements(this, link/Calculator : inputField/); }
return null;
}
Sooooooooooo my bad!!! I'm so sorry! Don't know what happened but the code in the .zip is working! And my not working code was with the described mistake :(EDIT: No, it's not working. Just got confused with different windows in which projects with the same name are opened.
Exactly!ButAnd in a video tutorial it's with that mistake. Perhaps it was permissible in previous versions of MPS to use smart references' concepts and their referents' concepts more interchangeably than now. Perhaps, Vaclav, it would be good idea to add some comments under video on JetBrains TV?Please, i'm begging you, Vaclav, answer that! :-)
EDIT: I also don't quite understand — the 'scope: search for InputField' fragment of InputFieldReference referent constraints means that some of the ancestors have to look for InputFields?
The only thing I don't understand so far is if it ever uses text presentation or not - I have problems with node presentations (in the near topic).