1

In our manually setup (C) project we use Ant script (added to Builders) for processing some files.

I have created an Eclipse C project template plugin for new projects creation. Now I would like to automatically add the Ant script to Builder with this template, but I don't know how.

Does anybody have some advice/example?

Thanks.

o_ndra
  • 87
  • 7

1 Answers1

1

AFAIK no one has provided a "process runner" that allows such configuration of other aspects of the project.

What you can do is add your own subclass of org.eclipse.cdt.core.templateengine.process.ProcessRunner that lets you configure other aspects of the project, such as additional builders. The Eclipse extension point you need is org.eclipse.cdt.core.templateProcessTypes.

Jonah Graham
  • 7,890
  • 23
  • 55
  • Although the question on the surface is very different, the answer is basically the same as https://stackoverflow.com/q/45232211/2796832. Using your own process runners you can write any arbitrary Java code to do whatever you want on template project creation. – Jonah Graham Jul 26 '17 at 08:49
  • I wanted to stick with configuring the project template by "template.xml" file only and I thought that there could be some tag and option, something like to setup path to Ant Script and other settings. I don't know if I have understood your answer correctly.. Does it mean that I'll have to write some Java code to tackle these settings (builder, build configuration, etc.), right? – o_ndra Jul 26 '17 at 13:40
  • Yes, you have to write "AddBuilder" and then reference that from your template.xml. AFAICT you are the first person wanting to do this specific type of project configuration, so you need to do the Java too. If you would be so kind as to contribute the additional processes back to CDT then the community can benefit (as you have by being able to use the processes already contributed :-) – Jonah Graham Jul 26 '17 at 14:20