MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / prepareSearch

Method prepareSearch

src/plugins/codeeditor/symbol/symbollocator.cpp:104–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104void SymbolLocator::prepareSearch(const QString &searchText)
105{
106 Q_UNUSED(searchText)
107
108 d->itemList.clear();
109 auto editor = d->currentEditor();
110 if (!editor)
111 return;
112
113 const auto &symbolList = SymbolManager::instance()->documentSymbols(editor->getFile());
114 if (!symbolList.isEmpty()) {
115 for (const auto &symbol : symbolList) {
116 d->createSymbolItem(symbol);
117 }
118 } else {
119 const auto &infoList = SymbolManager::instance()->symbolInformations(editor->getFile());
120 for (const auto &info : infoList) {
121 d->createSymbolItem(info);
122 }
123 }
124}
125
126QList<baseLocatorItem> SymbolLocator::matchesFor(const QString &inputText)
127{

Callers

nothing calls this directly

Calls 7

documentSymbolsMethod · 0.80
symbolInformationsMethod · 0.80
clearMethod · 0.45
currentEditorMethod · 0.45
getFileMethod · 0.45
isEmptyMethod · 0.45
createSymbolItemMethod · 0.45

Tested by

no test coverage detected