Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] How can I properly add an IPathEntry to an ICProject?

I am trying to add an IPathEntry to a managed build project.

I used the following code to add the IPathEntry to the ICProject:
cProject.setRawPathEntries(pathEntries, new SubProgressMonitor(monitor, 80));
// where pathEntries is the array of original cProject.getRawPathEntries() plus the new IPathEntry (note that there is a managed container in this array)

This works well and displays the Include in the list of the project's Includes but it doesn't add the path to the managed build properties.  Which seems to be necessary for the project to be compiled properly (without this entry the #include "files" are not found and have red problem markers on them)
i.e. Properties->C/C++ Build->Tool Settings->GCC C++ Compiler->Directories

Vlad mentioned that I need to add the IPathEntry to the managed container noted above although there is no way to do so through the API.  Or should the managed build be responsible for checking all entries instead of just the managed container when the makefile is generated and the properties are displayed in the UI?

Devin Steffler
IBM's Eclipse CDT
Ottawa (Palladium), Ontario, Canada

Back to the top