Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » 2-step generating
2-step generating [message #1016999] Fri, 08 March 2013 09:25
Michal S is currently offline Michal S
Messages: 73
Registered: July 2011
Member
Hello,
one part of my model (saved in .dsl1 files) produces another .dsl1 files as the output of generator. How can I process this freshly generated files inside doGenerate method?

For example:
Step 1: file1.dsl1 is processed and file2.dsl1 is generated
Step 2: file2.dsl1 is processed and file3.txt is generated
Both steps work separately very well. If I open generated file2.dsl1 and re-save it then file3.txt is generated. The only problem is, that I don't want to open and re-save file2.dsl1 to generate file3.txt, it should be done automatically.

I guess I need to register file2.dsl1 as Resource and process this resource recursively with doGenerate method, but I don't know, how to do it...

Further explanation:
I have already built one language (DSL1) and generator for my purposes.
In future I want to design another language (DSL2) and generator. Output of DSL2 generator should be DSL1 model. DSL2 will need to access DSL1 model, which were written previously. Temporarily I just want to prepare prototype of DSL2 included in DSL1, I will split the languages later.

Thank you & Best regards
Michal
Previous Topic:Question on cross-referencing and scoping
Next Topic:Auto-edit after reference completion
Goto Forum:
  


Current Time: Fri Aug 29 14:23:26 EDT 2014

Powered by FUDForum. Page generated in 0.03361 seconds