equivalent for removed method?

This method used exist in MPS 3.4-:


It helped find a concept declaration from an fqName. In 3.4, it was marked as deprecated, but without indication or explanation for possible alternatives. 

In MPS 2017.1, it is gone. Does anybody know what to use to locate a concept given its fqName?



Generally, you shall not use fqn to access concepts, nor concept declarations. We are working on eliminating fqn dependency for years, and were hoping clients of MPS API update along the way. Indeed, the approach to documentation is poor in the team, and there should have been an explanatory comment added together with deprecation. 

What do you need ConceptDeclaration instance for? Depending on usage, you might need to use SConcept instead.


Hi Fabien,

While not answering directly to your doubt, my former post may be useful when you already know the concept declaration: Programmatically create an SConceptAdapter .



Sérgio Ribeiro
Porto - Portugal



I've commented in the referenced post. Just to keep it clear - avoid use of MPS internals in the way outlined in the post. Instead, consider use of high-level MPS constructs (like concept/REFERENCE/) that would help you not to bother with migration of your code each time MPS internals change. 


Thanks both. I need to implement a replacement for jetbrains.mps.lang.behavior.structure.ThisNodeExpression, that makes the 'this' reference final in some contexts. I found that the generator for ThisNodeExpression uses another deprecated method. As usual, this deprecated method does not document an alternative, and I don't see how to use concept/REFERENCE/ in this case (not a constant concept to refer to).


If we are in a context of generator, you likely would stick to AbstractConceptDeclaration references, and concept// (aka SConcept aka concept runtime presentation) is not an option. Although it depends whether we are talking about the code you generate or the one you generate with (i.e. template queries).


Could you please tell more about the changes you need to introduce to template of ThisNodeExpression (is it reduce_ThisNodeExpression one?). Feel free to send me an email if you don't want to discuss it here, I'm eager to come up with an approach that would use no deprecated code.


Please sign in to leave a comment.