简体   繁体   中英

Writing a program to configure Eclipse CDT programmatically

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 (eg 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.

您可以尝试创建一个 Oomph 设置脚本,它可以配置为更改工作区首选项和许多其他内容,这里是基本教程:https ://eclipsesource.com/blogs/tutorials/oomph-basic-tutorial/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM