| 1076 | } |
| 1077 | |
| 1078 | void 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 | |
| 1097 | std::string UniversalLocator::getCurDocURI() { |
| 1098 | return mSplitter->curEditorIsNotNull() |
nothing calls this directly
no test coverage detected