[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-core-dev] Includes resolving/indexing after programmatic change of include paths
|
I don't know if there is a bug or I didn't performed something.
Our plugin uses with Managed Build Projects. There is a c++ source code file
with include statement with an include file stored in external folder.
In order to resolve includes, we modify include paths programatically for
the default configuration using the code like that:
IConfiguration conf =
ManagedBuildManager.getDefaultConfiguration(project).getDefaultConfiguration();
String[] value = {"/some/path/"};
ITool[] tools = conf.getTools();
while (ITools tool: tools) {
if (tool.getName().equals("GCC C++ Compiler")) {
IOption[] options = tool.getOptions();
while (IOption option: options) {
if (option.getName().equals("Include paths (-I)")) {
conf.setOption(conf, holder, option, value);
break;
}
}
}
}
ManagedBuildManager.saveBuildInfo();
Where /some/path/ is the path where mentioned include file is stored.
I'm not sure this code is the best but anyway it, at least, updates include
paths in project properties.
After that, includes are not resolved. I don't know any workarounds except
full re-index.
Is it a bug or expectable behaviour (some additional steps are needed)?
--
View this message in context: http://www.nabble.com/Includes-resolving-indexing-after-programmatic-change-of-include-paths-tp23279623p23279623.html
Sent from the Eclipse CDT - core mailing list archive at Nabble.com.