How to retrieve the generator output path during generation

Hi,

I'm currently working on a generator for my DSL that needs the information where the generated contents are/will be. Is there any possibility to get access to this information? I saw that it is stored in the respective solution module. But the module does not provide any access method.

It would be great if anybody could help.

Thank you in advance,
LaAck
1 comment
Ok, I figured it out:

You can retrieve the current module via node.model.module. This you have to cast the more general "Model" to "Solution" and then there is a property called "outputPath".

But it seams that this is somehow "readonly". Assigning a new value to this attribute causes a ClassCastException. Does anyone know what the problem is?
The message is: java.lang.ClassCastException: jetbrains.mps.project.structure.ProjectStructureModule$ProjectStructureSModelDescriptor cannot be cast to jetbrains.mps.extapi.model.EditableSModelBase

Thank you again in advance,
LaAck
0

Please sign in to leave a comment.