|RE: [cdt-dev] Updating the indexer does not discard the unused headerfiles from the index|
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Abeer Bagul
Sent: Friday, November 14, 2008 8:26 AM
Subject: [cdt-dev] Updating the indexer does not discard the unused headerfiles from the index
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:
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:
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
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.
Back to the top