Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] Updating the indexer does not discard the unused headerfiles from the index

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?

I don't think there is, you should raise an enhancement request on bugzilla,
Markus.


From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Abeer Bagul
Sent: Friday, November 14, 2008 8:26 AM
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] Updating the indexer does not discard the unused headerfiles from the index
Importance: Low

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

Back to the top