I have few problems with my Jetbrains MPS (version 2020.3.6) project:
I have an project that defines two languages A & B. I defined a generator that translates from A to B, and a textGen for B and A. This works perfectly, meaning it generates in the MPS IDE the B text file. Then I created a parser for language A and new action that imports a text file and use an MPS helper class to parse it and generates from it a model of language A. Now if I want to generate the B text file from an imported A model, I have to manually mouse click "Preview generated text" on the A model or use the keyboard shortcut. Until now, everything works fine.
I tried to automatically generate the B file text directly in the action that imports and creates the A model, using TextGeneratorEngine.generateText(RootNodeA), but it returns 'Failed to generate text for node'. Why is that ? am I missing imports or TextGeneratorEngine doesn't work inside an action or other reasons ? I also tried to use CopyOutcome to eventually copy the generated text (which for now doesn't exist) to a certain location, but the class CopyOutcome doesn't exist in my MPS environment, which it should according to the jetbrains website. Any insight or alternative on this ? I actually try to use nio Files.writer but it doesn't work.
here's the action execute event main code :
Failed to programmatically generate text in an MPS action using textgeneratorEngine.