LocatorMatcher: Introduce LocatorMatcherTaskCreator

Register cpp and lsp matchers for all symbols,
classes and functions.

Change-Id: Id85c8164077ec395dac7e6ff45acc89db9e6ae08
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Jarek Kobus
2023-04-05 08:12:43 +02:00
parent dde4a7ebf5
commit 0c3789726d
6 changed files with 90 additions and 14 deletions

View File

@@ -904,6 +904,10 @@ void CppModelManager::initCppTools()
setSymbolsFindFilter(std::make_unique<SymbolsFindFilter>(this));
setCurrentDocumentFilter(
std::make_unique<Internal::CppCurrentDocumentFilter>(this));
// Setup matchers
LocatorMatcher::addLocatorMatcherCreator([] { return QList{CppEditor::cppLocatorMatcher()}; });
LocatorMatcher::addClassMatcherCreator([] { return QList{CppEditor::cppClassMatcher()}; });
LocatorMatcher::addFunctionMatcherCreator([] { return QList{CppEditor::cppFunctionMatcher()}; });
}
CppModelManager::CppModelManager()