MCPcopy Create free account
hub / github.com/SpartanJ/eepp / updateDocumentSymbol

Method updateDocumentSymbol

src/tools/ecode/universallocator.cpp:1078–1095  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1076}
1077
1078void UniversalLocator::updateDocumentSymbol( const LSPSymbolInformationList& res ) {
1079 if ( mCurDocQuery.empty() ) {
1080 mTextDocumentSymbolModel =
1081 LSPSymbolInfoModel::create( mApp->getUISceneNode(), mCurDocQuery, res, true );
1082 mLocateTable->setModel( mTextDocumentSymbolModel );
1083 mLocateTable->getSelection().set( mLocateTable->getModel()->index( 0 ) );
1084 mLocateTable->scrollToTop();
1085 } else {
1086 asyncFuzzyMatchTextDocumentSymbol( res, mCurDocQuery, 100, [this]( const auto model ) {
1087 mTextDocumentSymbolModel = model;
1088 mUISceneNode->runOnMainThread( [this] {
1089 mLocateTable->setModel( mTextDocumentSymbolModel );
1090 mLocateTable->getSelection().set( mLocateTable->getModel()->index( 0 ) );
1091 mLocateTable->scrollToTop();
1092 } );
1093 } );
1094 }
1095}
1096
1097std::string UniversalLocator::getCurDocURI() {
1098 return mSplitter->curEditorIsNotNull()

Callers

nothing calls this directly

Calls 9

scrollToTopMethod · 0.80
runOnMainThreadMethod · 0.80
emptyMethod · 0.45
getUISceneNodeMethod · 0.45
setModelMethod · 0.45
setMethod · 0.45
getSelectionMethod · 0.45
indexMethod · 0.45
getModelMethod · 0.45

Tested by

no test coverage detected