I'm generating models programmatically and filling the up with content also programmatically. However I am having trouble adding used languages programmatically (I do not know the languages used by the model in advance). I have tried using the Open API and this code I found linked to the used guide:
// adding used language to a module
AbstractModule internalModule = (AbstractModule) sModule;
However this does not work. I'm using MPS 3.4.1 and there actually the getUsedLanguages method is deprecated.