通过API访问Eclipse C / C ++构建信息

时间:2016-09-08 14:59:39

标签: eclipse-plugin eclipse-cdt

是否有Eclipse插件的API来获取项目的C / C ++构建信息? Build Information

我已经阅读了Eclipse CDT插件开发人员指南,但未能找到任何可以帮助我获取项目信息的内容。

1 个答案:

答案 0 :(得分:0)

文档在指南中。您需要的部分是:

但快速启动API明智的是:

IProject project = ...;
IManagedBuildInfo buildInfo = ManagedBuildManager.getBuildInfo(project);
if (buildInfo != null) { // you may also check for C Nature on the project as a precondition
    String buildCommand = buildInfo.getBuildCommand();
    // etc
}