| Summary: | Unused header will be removed from index when saved | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Jens Elmenthaler <jens.elmenthaler> |
| Component: | cdt-parser | Assignee: | Sergey Prigogin <eclipse.sprigogin> |
| Status: | RESOLVED FIXED | QA Contact: | Markus Schorn <mschorn.eclipse> |
| Severity: | normal | ||
| Priority: | P3 | CC: | cdtdoug, eclipse.sprigogin, malaperle, mschorn.eclipse, yevshif |
| Version: | 8.0 | ||
| Target Milestone: | 8.0.1 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Jens Elmenthaler
(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
|