| Summary: | Improve treatment of dependent projects and external SDKs | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Markus Schorn <mschorn.eclipse> |
| Component: | cdt-indexer | Assignee: | Markus Schorn <mschorn.eclipse> |
| Status: | RESOLVED FIXED | QA Contact: | Markus Schorn <mschorn.eclipse> |
| Severity: | normal | ||
| Priority: | P3 | CC: | cdtdoug, eclipse.sprigogin, eostroukhov, jens.elmenthaler, malaperle, mober.at+eclipse, yevshif, zeratul976 |
| Version: | 8.0 | ||
| Target Milestone: | 8.1.0 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 351659 | ||
|
Description
Markus Schorn
Makes perfect sense to me. If I remember correctly, that's how the PDOM indexer worked originally, no? Either way, +1 from me. Sergey and Doug, thanks for your feedback. (In reply to comment #2) > If I remember correctly, that's how the PDOM indexer worked originally, no? > Either way, +1 from me. It did prior to CDT 4.0, when we did not have the ability to combine PDOMs at all. Andrew F.'s work on external SDKs and composite indexes gave us more flexibility. The decision to use this flexibility for indexing dependent projects was probably not the best one. (In reply to comment #0) > Current approach: > ================= > When indexing a project the indexes of the dependency projects (as specified > via project references) are reused. An external SDK is treated equally to a > dependency project. What qualifies as an external SDK? For example, if I use the Boost libraries from several projects, but I don't have a project for the Boost libraries themselves, are they considered an external SDK? (In reply to comment #4) > What qualifies as an external SDK? For example, if I use the Boost libraries > from several projects, but I don't have a project for the Boost libraries > themselves, are they considered an external SDK? No, the header files that are (possibly indirectly) included from a file in your project will be indexed although they are external to the workspace. However, you could create a pre-built index for the boost library, which needs to be registered via an CDT extension point, before it can be used. It then provides index information for workspace external files, even if they are not included from a source in a project. Sergey, I think all of the contributed fragments (PDOM and non-PDOM) should get the same treatment. If there needs to be a difference in where a fragment wants to participate, I want to make this part of the extension point. With that you could register any fragment to for instance participates in call-hierarchy, but not in content assist. Because I am lazy I want to limit the possibilities to the tools where we actually need to make a difference. The tools that need to be able to work with contributed fragments are: Search, Call Hierarchy, Type Hierarchy, Include Browser, Content Assist, Navigation, Add Import. (Did I miss a tool?) If you do want your extension fragments not to be used for any of the tools above, please tell me so. I'll create the possibility to exempt them via an attribute in the extension point. (In reply to comment #6) The proposal makes a lot of sense. It would be nice to cover all the tools that you listed. I can make changes to all remaining tools after you change one or two. (In reply to comment #7) > (In reply to comment #6) > The proposal makes a lot of sense. It would be nice to cover all the tools that > you listed. I can make changes to all remaining tools after you change one or > two. Actually it does not make much difference whether to allow the customization for one of more tools, I'll do them all. (In reply to comment #8) Refactoring should be added to the list of tools. I have committed my changes. You may want to revise my change to CIndex.findNames(...): Because the indexer can supersede an SDK when a header is included I have readded the behavior that IIndex.findNames(...) skips names in SDKs when a name in pdom of the indexer has been found. This is not a perfect solution (names should also be skipped when just the file is present in a pdom of the indexer, however I did not come up with an efficient way of detecting that). Also, you may not want this for your fragments, in which case I offer to make it configurable. In case this work does not match your needs, go ahead and change it. (In reply to comment #9) > Refactoring should be added to the list of tools. I did not touch refactoring, you can add it if it is necessary. *** cdt git genie on behalf of Markus Schorn ***
Bug 368160: Dependent projects and SDKs.
[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=fa55d3662d571d16f7c82de3574168d6c0971f04
My changes work as they are, if necessary additional options can be added. |