0

I'm developing a DSL using xText (version 2.10.0) and i would like to add also a code generator.

When running the plug-ins, as I understood, the code generator should be invoked automatically upon a change in a file. This is not happening.

Using a debugger I've noticed that the doGenerate function is not invoked.

What can I do so the doGenerate function will be invoked automatically?

Thanks.

1 Answers1

1

Your file needs the right file extension (case sensitive) the project needs xtext nature and build automatically needs to be enabled. Then the generator will be called upon save of error free models

Christian Dietrich
  • 11,778
  • 4
  • 24
  • 32
  • I've verified what you mentioned: the file has the right extension, the xtext nature exist in the ui plugin and build automatically is enabled - still the generator is not called. Could you please suggest me how to proceed? – Cfir Aguston Sep 23 '16 at 15:44
  • Can you share the complete dsl project and the project containing the model file e.g. On github – Christian Dietrich Sep 23 '16 at 17:48
  • I've figure it out - the test project was not set as xtext project: right click on the project -> Configure -> Convert to Xtext Project. Tanks. – Cfir Aguston Sep 24 '16 at 18:45