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

Method update

src/tools/ecode/plugins/autocomplete/autocompleteplugin.cpp:1026–1044  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1024}
1025
1026void AutoCompletePlugin::update( UICodeEditor* ) {
1027 if ( mClock.getElapsedTime() >= mUpdateFreq || mDirty ) {
1028 mClock.restart();
1029 mDirty = false;
1030 Lock l( mDocMutex );
1031 for ( auto& doc : mDocs ) {
1032 if ( !doc->isLoading() && mDocCache[doc].changeId != doc->getCurrentChangeId() ) {
1033 {
1034 Lock lu( mDocsUpdatingMutex );
1035 auto du = mDocsUpdating.find( doc );
1036 // Dont update the document cache if it's still updating the document
1037 if ( du != mDocsUpdating.end() && du->second == true )
1038 continue;
1039 }
1040 mThreadPool->run( [this, doc] { updateDocCache( doc ); } );
1041 }
1042 }
1043 }
1044}
1045
1046void AutoCompletePlugin::drawSignatureHelp( UICodeEditor* editor, const Vector2f& startScroll,
1047 const Float& /*lineHeight*/, bool drawUp ) {

Callers

nothing calls this directly

Calls 7

getElapsedTimeMethod · 0.80
restartMethod · 0.45
isLoadingMethod · 0.45
getCurrentChangeIdMethod · 0.45
findMethod · 0.45
endMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected