Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 337559

Summary: Add FullIndexer again
Product: [Tools] CDT Reporter: Marko Tomljenovic <marko.tomljenovic>
Component: cdt-coreAssignee: Project Inbox <cdt-core-inbox>
Status: CLOSED DUPLICATE QA Contact: Doug Schaefer <cdtdoug>
Severity: major    
Priority: P3    
Version: 7.0.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Marko Tomljenovic CLA 2011-02-18 07:49:00 EST
Build Identifier: 7.0.1

We are havin serious problem with the Index due to this problem: "The fast indexer is the preferred option; however it may not be fully accurate under certain circumstances. When a header file is included in a source file it is subject to any macros that have been defined at that point. Some library headers use macros in conjunction with preprocessor conditionals (#ifdefs) to partially include a header file. Sometimes such a header file is included more than once in a project, if the macros that the header depends on are different each time the header is included then different parts of the header may be included in different places. The fast indexer will not be accurate in this scenario because it will only index the header the first time it is encountered. The full indexer will properly index the header for each time it is included." (see http://stackoverflow.com/questions/763837/eclipse-has-two-c-c-indexers-fast-full-whats-the-difference)

If the full indexer can solve the described problem it shall be returned to the CDT feature.

Reproducible: Always

Steps to Reproduce:
1. See details
Comment 1 Doug Schaefer CLA 2011-02-18 09:50:19 EST
Oh, god, no. The Full Indexer is an order of magnitude slower than the Fast indexer and almost always produces the same results.

I believe we have the indexers set up as an extension point. If people want to move the full indexer to an optional plug-in that is never shipped in the Eclipse packages, then feel free.
Comment 2 Marko Tomljenovic CLA 2011-02-18 09:55:16 EST
I would take the risk having a higher runtime but having the proper index content.

This means I can take the FullIndexer from e.g. the CDT 6.0.2 release and plug it in the 7.0.1 release?
Or are there any API changes in the PDOM, .... ?
Comment 3 Marko Tomljenovic CLA 2011-02-18 09:56:10 EST
Wait, there is a problem.
The indexer configuration ui in the properties page does not allow to choose the indexer any more!!!!
Comment 4 Marko Tomljenovic CLA 2011-02-18 10:17:57 EST
(In reply to comment #3)
> Wait, there is a problem.
> The indexer configuration ui in the properties page does not allow to choose
> the indexer any more!!!!

If I can at least set it programmatically I am fine with that too.
Comment 5 Markus Schorn CLA 2011-02-18 10:19:52 EST
The value of the full-indexer is overrated because it ends up storing one
version of the header file in the index. Much of the tooling depends on
index-based parsing (even if you'd use an indexer that does not work
index-based). For example, when you use F3, there is no time to parse the
editor content without using the index.

I dought that it is simple to reanimate the full-indexer, but you can give it a
try. The UI for selecting the indexer will appear as soon as there is a
contribution to the extension point.

The solution for the underlying issue (header file used with different macro
dictionaries) is outlined in bug 197989. It would be more valuable to invest
into this.

*** This bug has been marked as a duplicate of bug 197989 ***