Hi All,
In our IDE, we have multiple versions of a toolchain
and the user switches between versions while developing his C project.
When
the user sets one version of the toolchain for the project, we update the
Paths and Symbols properties page for the project with the path to the include
directory where the header files of the toolchain version are stored.
E.g.:
Add the following path to the Includes tab in the Paths and Symbols properties
page:
C:\alltoolchains\version1\include
When the index is rebuilt
using the popup menu action Index -> Rebuild (class: RebuildIndexAction),
all the header files in the above location which are included in the project
are properly added into the indexer.
Lets assume 6 header files from the
toolchain include directory are added into the index.
Now the user
changes the toolchain version to use version2. When the user changes the
version, we update the Includes tab in the Paths and Symbols properties page
and now the earlier path is replaced
with:
C:\alltoolchains\version2\include
We want to update the index
rather than rebuilding it (to improve performance). So the action Index ->
Update with Modified files (class: UpdateIndexWithModifiedFilesAction) is
used. This action adds 6 header files from the new version (version2) into the
index, but the older header files from version1 are not removed.
Hence
if the user selects a call to printf in the project source and presses F3, a
dialog pops up asking him to select either
C:\alltoolchains\version1\include\stdio.h
or
C:\alltoolchains\version2\include\stdio.h
The user is confused
because according to him, the current active version is version2.
My
question is:
Is there any api which can be called prior to calling
UpdateIndexWithModifiedFilesAction, which will examine the index and delete
all header files in the index which are not included from the Include tab of
the Paths and Symbols properties page?
Thanks in
advance.
Thanks
Abeer Bagul
Tensilica
India