I'm very new to MPS and am working on a DSL that will generate XML to be parsed and executed by a separate application.
As part of my DSL, I want to be able to refer to aspects of an external code library. In this case, the external code is in C#. For example, I want to be able to reference the types and public methods contained therein. My DSL contains concepts which wrap the types of things I want to reference in my MPS solution (e.g. CSharpType and CSharpMethod).
I can effectively generate a representation of my C# code in an easy-to-parse format (e.g. XML) which describes all the information my MPS solution will need to import.
I'm just trying to determine the best way to handle the import and node creation automation. It looks like this can be handled through the openAPI of MPS, but I've yet to find a nice example.
Is there one which someone can point me towards?
Is it best to handle the node generation from within MPS, or by modifying the model externally? Will MPS cope well with an automated process which later alters some aspects of these generated nodes (i.e. keeping the generated nodes in sync with the external codebase). It's fine if such an update creates errors which need to be fixed in the DSL solution. I just want to make sure I don't ever risk corrupting an entire solution by breaking references during an update.
Thanks very much for any insight. Hopefully this makes sense, and is possible :)