Community
Participate
Working Groups
Build Identifier: 8.0 Since 8.0 there is a new option to automatically index an unused header file when it is opened in an editor. This enables content assist to advertise members that are declared behind the current cursor positions also in header files that are reachable via a source file (see bug 103857). However, after editing and saving again, the header file is removed from the index, and the feature stops working. Reproducible: Always Steps to Reproduce: 1. Create a new header file 2. Define a class with some members 3. Save the file 4. At the top of the class body, define a function and try to access the members via content assist. Nothing is proposed.
(In reply to http://bugs.eclipse.org/bugs/show_bug.cgi?id=103857#c34) > I can reproduce the behavior. The feature of adding files opened in the editor > to the index is buggy, when the file is saved it is removed from the index > again. --> Please create a separate bug for that. Markus, do you know the mechanism of the removal?
(In reply to comment #1) > (In reply to http://bugs.eclipse.org/bugs/show_bug.cgi?id=103857#c34) > > I can reproduce the behavior. The feature of adding files opened in the editor > > to the index is buggy, when the file is saved it is removed from the index > > again. --> Please create a separate bug for that. > Markus, do you know the mechanism of the removal? AbstractIndexerTask.extractFiles(...) detects header files that are no longer included by a source file and stores them in a list for later removal.
I've committed a fix to the master branch. Will port it to cdt_8_0 after people have had an opportunity to test the fix. Jens, could you please try the fix. Markus, could you please review it at http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=c14dcb907d2fe629b66f069183b141b97a409464. Thanks.
(In reply to comment #3) > I've committed a fix to the master branch. Will port it to cdt_8_0 after people > have had an opportunity to test the fix. > Jens, could you please try the fix. Works now. Thanks.
Fixed in cdt_8_0 > 20110717 and master > 20110714.
(In reply to comment #3) The fix looks good to me. However, it was not neccessary to add IndexerInputAdapter.isIndexedUnconditionally(Object tu), the other method IndexerInputAdapter.isIndexedUnconditionally(IIndexFileLocation ifl) should do it.
(In reply to comment #6) > However, it was not neccessary to add > IndexerInputAdapter.isIndexedUnconditionally(Object tu), > the other method > IndexerInputAdapter.isIndexedUnconditionally(IIndexFileLocation ifl) > should do it. Good point. Simplified the code.
*** cdt git genie on behalf of 351271 *** Bug 351271. Code simplification suggested by Markus Schorn. [*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=b5c36e47a5e4754a5073996f03be31e3bb9e6058
*** cdt git genie on behalf of 351271 *** Bug 351271. Code simplification suggested by Markus Schorn. [*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=6d8a98e790f43626bab61125f3228dc96248baa9