Writing a program to configure Eclipse CDT programmatically

75 Views Asked by At

I am using Eclipse for C++ development. Each time I create a new workspace I need to go through a tedious series of manual steps to repeat the same configuration steps I have already performed on other workspaces. I am using a perforce perspective for team work. Some of the configuration steps include identification of the perforce client and connection information to the perforce server. Going through all the manual configuration steps usually takes me around 10 minutes which is a waste of time as I should be able to do that in seconds. I am trying to automate this task and I am looking for the best way to approach it. I suppose I could retrieve the metadata .settings directory for one of my clients and use some scripts to edit it to reflect the information that is specific to my workspace (e.g. the name of my perforce client, or the path to object files for the build configuration). But I was wondering if there would be a more elegant way to interface directly with the Eclipse program in order to modify the configuration programmatically after initial workspace creation. Which languages are available to me if there is indeed an programmatic API to modify the CDT workspace settings and preferences? Where can I find relevant documentation and tutorial resources? Python, Perl or C++ would be ideal.

1

There are 1 best solutions below

0
On

You can try to create an Oomph setup script, it can be configured to change workspace preferences and a lot of other things, here is the basic tutorial: https://eclipsesource.com/blogs/tutorials/oomph-basic-tutorial/