Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » trigger multiple generators from code
trigger multiple generators from code [message #794047] Wed, 08 February 2012 21:44
Bruce L. is currently offline Bruce L.Friend
Messages: 81
Registered: June 2011

I have several different generators in my DSL project, each one with its own IGenerator implementation, and its own ...StandaloneSetup that binds such IGenerator

The workflow file contains multiple blocks like this one
	component = org.eclipse.xtext.generator.GeneratorComponent {
		register = my.package.<MyDSL>StandaloneSetup_XYZ {}
		slot = '<root element>'
		outlet = {
			path = '${targetDir}'

and so it triggers all the different generators.

How can I do the same thing from a .java source? I know that xtext generates, which is basically triggering the default generator of the language. But I would like to know how to extend this for multiple generators.
For instance I would need that one generator A calls in turn another generator B before starting its work; therefore I need to set up and trigger B from the code (java or xtend2) of A, without the magic workflow.

I'm a bit confused about setups, injectors, ecc...

Many thanks in advance
Previous Topic:Writing unit tests for code written in my DSL
Next Topic:[Xtext 2.2] Is there a centralized place where I can turn off scope resolution for certain files?
Goto Forum:

Current Time: Mon Jun 01 05:56:10 GMT 2020

Powered by FUDForum. Page generated in 0.01312 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top