Controlling The Output's Directory Structure

Let's say I have a model M in my language L and I need to generate code for two different technologies A and B. Each technology output will have its own directory structure, which will have to be generated along with the target text files.

For example, A has the following structure (a Maven module):

- pom.xml

- src/main/java/com/package/

And B has the following structure (a RubyOnRails app):

- config/routes.rb

- controller/my_controller.rb

The MPS build has to generate both directory structures entirely along with the files, based on the same model.


How do I go about implementing that in MPS?


I have managed to generate individual files by implementing root templates, but I don't know how to define a directory structure and how to tell the generators to put the target files in the right directories.


1 comment
Comment actions Permalink

Unfortunately, there's no mechanism in MPS to control output directory structure yet. You may use custom Make facet to layout your output the way you like or try to workaround with a 'CopyOutcome' annotation (which copies textgen outcome to a specified disk location).


Please sign in to leave a comment.