Automatic creation of concept's instance in solution

Hello,

is there any possibility how to automatically create instance of a concept in the solution? I have a concept with crucial definition in my DSL and I need the user to instantiates it.

Therefor it would be nice, when this concept will create by itself after creating solution. Or at least some error message, when this concept does not exist yet.

Thanks for any response,
Tom
2 comments
There is not such a functionality in MPS right now. You can try creating your own wizard and action for this specific type of solution.
0
Tom,

Though it's not an open API and we can change it at any moment, you can try
AbstractModule.registerModelCreationListener(). It's executed every time a new model is created in any module. That's how we initialize language aspects on language creation, for example.

You can also try SModelRepository.addModelRepositoryListener().

Regards,
Mihail.
0

Please sign in to leave a comment.