template switch extending InstantiateAspectDescriptor is not called

I have created a template switch that extends InstantiateAspectDescriptor in a language that has a SimpleLanguageAspectDescriptor defined. I have read the cookbook for custom aspects (https://confluence.jetbrains.com/display/MPSD20182/Custom+language+aspect+cookbook) and looked at the behavior language definition for example. For some reason that I do not understand no extra aspect is generated in Language.java when I use this aspect in another language definition. In fact my template switch is not even called to examen its condition.

This is my template switch:

Do I mis something?

I am working with MPS 2018.2.4.

kind greeting, Wim

Official comment

 Hi, Wim,

Thank you for reporting. I've checked and found an important thing is missed in the doc. When you extend a concept switch, you should also add a dependency in your generator's properties saying the generator extends lang.descriptor's generator, as on the screenshot.

We'll correct the doc and add corresponding checks, I've already created an issue for that: https://youtrack.jetbrains.com/issue/MPS-28684

Thanks once again,


Yes, that solved my issue. Thanks Mihail!


Please sign in to leave a comment.