| 1024 | } |
| 1025 | |
| 1026 | void 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 | |
| 1046 | void AutoCompletePlugin::drawSignatureHelp( UICodeEditor* editor, const Vector2f& startScroll, |
| 1047 | const Float& /*lineHeight*/, bool drawUp ) { |
nothing calls this directly
no test coverage detected