CppTools: Remove separate indexing revision
For indexing we used a custom revision that was updated on each modelManager BuiltinIndexingSupport::refreshSourceFiles() call. This could lead to rejection of updated documents triggered by refactoring actions, like for the following case: 1. Open a project containing a.h and a.cpp 2. Open a.cpp, insert some new lines, save and close the document 3. Open a.h and rename a function that is defined in a.cpp --> The refactoring action modifies a.h and a.cpp, so re-indexing of those is triggered. Since a.cpp has already a higher revision (step 2) than the updated document, the updated document is discarded. As a consequence find usages and follow symbol fails for the renamed function. Now the document call back provided to CppSourceProcessor is responsible for updating the document revision based on the latest revision in the global snapshot. Change-Id: I4dfa0a4d34991655acfa749109f00c47b0fbfdbe Reviewed-by:Orgad Shaneh <orgads@gmail.com> Reviewed-by:
Erik Verbruggen <erik.verbruggen@theqtcompany.com> Reviewed-by:
Eike Ziller <eike.ziller@theqtcompany.com>
Showing
- src/plugins/cpptools/builtinindexingsupport.cpp 0 additions, 6 deletionssrc/plugins/cpptools/builtinindexingsupport.cpp
- src/plugins/cpptools/builtinindexingsupport.h 0 additions, 1 deletionsrc/plugins/cpptools/builtinindexingsupport.h
- src/plugins/cpptools/cppmodelmanager.cpp 5 additions, 0 deletionssrc/plugins/cpptools/cppmodelmanager.cpp
- src/plugins/cpptools/cppmodelmanager_test.cpp 55 additions, 0 deletionssrc/plugins/cpptools/cppmodelmanager_test.cpp
- src/plugins/cpptools/cppsourceprocessor.cpp 0 additions, 5 deletionssrc/plugins/cpptools/cppsourceprocessor.cpp
- src/plugins/cpptools/cppsourceprocessor.h 0 additions, 2 deletionssrc/plugins/cpptools/cppsourceprocessor.h
- src/plugins/cpptools/cpptoolsplugin.h 1 addition, 0 deletionssrc/plugins/cpptools/cpptoolsplugin.h
Loading
Please register or sign in to comment