Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] What is the way to set include paths so they survive a project rename?

Hi
The arduino environment relies heavily on libraries. Libraries are a set of source code delivered by others. As to not mangle code I use a include paths for each and every library. Given that this is for C, C++ and assembly that is a big list of include paths.

Now Someone noticed that when you rename a project the includes paths are not modified. If I use the gui to include a workspace folder of the project "test" I get "/test/libraries/library" and it is marked as workspace path.
My code generates the same using following method
ICLanguageSettingEntry[] OrgIncludeEntries = lang.getSettingEntries(ICSettingEntry.INCLUDE_PATH); ICLanguageSettingEntry[] IncludeEntries = new ICLanguageSettingEntry[OrgIncludeEntries.length + 1]; System.arraycopy(OrgIncludeEntries, 0, IncludeEntries, 0, OrgIncludeEntries.length); IncludeEntries[OrgIncludeEntries.length] = new CIncludePathEntry(IncludePath, ICSettingEntry.VALUE_WORKSPACE_PATH);

where IncludePath equals "/test/libraries/library"

In both cases after renaming the project the include paths become invalid.
I tried using ${ProjName} but that seems to be incompatible with "workspace path"

So I was wondering: How do I add a folder to the include path in such a way the project can still be compiled/indexed after a rename?

Best regards
Jantje



Back to the top