I need to do an Eclipse plug-in and,inside of it, I will use an Acceleo generator made by my self. How I can use an acceleo generator inside an Eclipse plug-in? Is there any documentation about it?
Thank you.
I need to do an Eclipse plug-in and,inside of it, I will use an Acceleo generator made by my self. How I can use an acceleo generator inside an Eclipse plug-in? Is there any documentation about it?
Thank you.
The easiest way would be to simply create a new Acceleo project (File > New > Other... > Acceleo Model To Text > Acceleo Project) as these projects are already plug-in projects. As you write your own Acceleo modules (
mtl
files) within this project, you'll notice that "java" files are generated beside them. These Java files are your entry point in order to launch Acceleo generations.It is up to you, then, to choose how to launch the generation : from a Java file (instantiate the generator, then call its "doGenerate" method, from an Eclipse right-click action ...).
You can use the "File > New > Other... > Acceleo Model To Text > Acceleo UI Launcher Project" wizard in order to get a code example for a right-click action launching an Acceleo module.
The online documentation contains some information on these aspects.