Hi Robin,
I don't know that much about templates but I'll try to help. What
are you trying to modify in the project? I think the only way to
modify the project is programmatically in a ProcessRunner. But
depending on what you're trying to do, there might already be an
existing one that does what you want and you can just use it in
your template.xml. For example, look at
org.eclipse.cdt.managedbuilder.templateengine.processes.SetMBSBooleanOptionValue
and there are other ones in the same package. You can also find
more of them in
org.eclipse.cdt.core.templateengine.process.processes. If there
are no ProcessRunner that does what you want, you can create your
own class extending ProcessRunner and modify the project as you
need. Again, SetMBSBooleanOptionValue should be a good example to
start with because it modifies the build information. Also, if you
create a new ProcessRunner and you think it could be useful to
others, please consider contributing it :)
Another way to modify the project after creation is if you have a
custom wizard page, you can specify an "operationClass" to be
executed at the end of the wizard. There you can modify the
project. For example you can take a look at
org.eclipse.cdt.internal.build.crossgcc.SetCrossCommandOperation.
It should also be possible to use a resource listener in your own
plug-in (in the Activator?) that modifies the project when it
detects it is created but I think this is the least desirable
solution.
Hope this helps,
Marc-André
On 14-03-24 07:07 AM, Robin Bussenot wrote:
Hello,
I'm using the plugin org.eclipse.cdt.core.templates and i
want to know how to access to project instance i just create.
I want to get the instance or find a way to modify the
config builder of this project.
Robin,
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev
|